Difference between revisions of "EVENT TYPE PERCEPTION APPEAR"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(sort key)
(formatting)
Line 1: Line 1:
*<b>Sent When:</b> A creature enters the perception area of creature receiving the event
+
{{Event
*<b>Sent From:</b> engine
+
|when=A creature enters the perception area of creature receiving the event
*<b>Sent To:</b> creatures
+
|from=Engine
 
+
|to=Creatures
Parameters:
+
|object0name= oAppear
 
+
|object0desc = Creature that entered the perception area
* object oAppear = GetEventObject(ev,0);
+
|int0name=nHostile
* int nHostile = GetEventInteger(ev, 0); // if hostile or not (TRUE/FALSE)
+
|int0desc= If hostile or not (TRUE/FALSE)
* int bStealthed = GetEventInteger(ev, 1); // if stealthed or not (TRUE/FALSE)
+
|int1name=bStealthed
* int nHostilityChanged = GetEventInteger(ev, 2); // if the creature was already perceived but just changed hostility (TRUE/FALSE)
+
|int1desc= If stealthed or not (TRUE/FALSE)
 +
|int2name= nHostilityChanged
 +
|int2desc= if the creature was already perceived but just changed hostility (TRUE/FALSE)
 +
}}
  
 
[[Category:Event types|PERCEPTION_APPEAR]]
 
[[Category:Event types|PERCEPTION_APPEAR]]

Revision as of 22:38, 23 July 2009

Source:
[Undocumented]
Sent when:
A creature enters the perception area of creature receiving the event
Sent from:
Engine
Sent to:
Creatures
Parameters:
  • Integer 0: If hostile or not (TRUE/FALSE)
  • Integer 1: If stealthed or not (TRUE/FALSE)
  • Integer 2: if the creature was already perceived but just changed hostility (TRUE/FALSE)
  • Object 0: Creature that entered the perception area

Usage

case EVENT_TYPE_PERCEPTION_APPEAR:
{
int nHostile = GetEventInteger(ev, 0); // If hostile or not (TRUE/FALSE)
int bStealthed = GetEventInteger(ev, 1); // If stealthed or not (TRUE/FALSE)
int nHostilityChanged = GetEventInteger(ev, 2); // if the creature was already perceived but just changed hostility (TRUE/FALSE)
object oAppear = GetEventObject(ev, 0); // Creature that entered the perception area

// insert event-handling code here

break;
}