Difference between revisions of "EVENT TYPE TRAP TRIGGERED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(formatting)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{needs review}}
 
{{needs review}}
 
{{event
 
{{event
|when=
+
|sourcefile=script.ldf
|from=
+
|when= sent by the engine when a placeable trap collides with something (eg. swinging log trap strikes a creature).
 +
|from= [[engine]]
 
|to=
 
|to=
 +
|tocategory1=trap
 +
|sortkey=TRAP_TRIGGERED
 +
|object0name=oTarget
 +
|object0desc=Target hit by trap
 +
|location0name=lImpact
 +
|location0desc=Impact location
 
}}
 
}}
  
 
[[Category:Event types|TRAP_TRIGGERED]]
 
[[Category:Event types|TRAP_TRIGGERED]]
[[Category:Traps]]
+
[[Category:Trap events|TRAP_TRIGGERED]]

Latest revision as of 04:11, 4 January 2010

The documentation on this page is incomplete, obsolete, or otherwise in need of a thorough review. The current content may provide a good starting point for this, but do not rely on its accuracy when using it to design content.

Source:
script.ldf
Sent when:
sent by the engine when a placeable trap collides with something (eg. swinging log trap strikes a creature).
Sent from:
engine
Sent to:
Parameters:
  • Object 0: Target hit by trap
  • Location 0: Impact location

Usage

case EVENT_TYPE_TRAP_TRIGGERED:
{
object oTarget = GetEventObject(ev, 0); // Target hit by trap
location lImpact = GetEventLocation(ev, 0); // Impact location

// insert event-handling code here

break;
}