Difference between revisions of "EVENT TYPE PERCEPTION APPEAR"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (|sourcefile=script.ldf)
m (test new to parameter)
Line 3: Line 3:
 
|when=A creature enters the perception area of creature receiving the event
 
|when=A creature enters the perception area of creature receiving the event
 
|from=Engine
 
|from=Engine
|to=Creatures
+
|to1=Creature
 
|object0name= oAppear
 
|object0name= oAppear
 
|object0desc = Creature that entered the perception area
 
|object0desc = Creature that entered the perception area

Revision as of 20:24, 5 August 2009

Source:
script.ldf
Sent when:
A creature enters the perception area of creature receiving the event
Sent from:
Engine
Sent to:
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;
}