Difference between revisions of "EVENT TYPE APPLY EFFECT"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (Cleaning up and expanding)
Line 1: Line 1:
 
{{needs review}}
 
{{needs review}}
 
{{event
 
{{event
|sourcefile=script.ldf
+
|sourcefile = script.ldf
|when=an effect is applied to the receiving object
+
|when       = an effect is applied to the receiving object
|to1=creature
+
|to          = creature, placeable
|to2=placeable
+
|tocategory1 = creature
|from=engine
+
|tocategory2 = placeable
|creatordesc= ???
+
|from       = engine
|sortkey=APPLY_EFFECT
+
|creatordesc = {{undocumented}}
 +
|sortkey     = APPLY_EFFECT
 
}}
 
}}
 +
== Remarks ==
 +
Relevant Eclipse engine code:
 +
<cpp>
 +
    pEvent->SetType(CSSCRIPTEVENT_EVENTTYPE_RULES_APPLYEFFECT);
 +
    pEvent->SetData(0, pEffect);
 +
</cpp>
  
Parameters:
+
Use [[GetCurrentEffect]] to get the effect that was just applied (there is no <code>GetEventEffect</code> function) which can be decomposed to get the effect's creator, type, etc.
*<b>Creator:</b> ???
+
*<b>Current Effect</b>{{undocumented}}: effect being applied
+
  
 
From SEffectHandler.cpp:
 
 
:pEvent->SetType( CSSCRIPTEVENT_EVENTTYPE_RULES_APPLYEFFECT );
 
:pEvent->SetData(0, pEffect);
 
 
[[Category:Event types|APPLY_EFFECT]]
 
[[Category:Event types|APPLY_EFFECT]]
 
[[Category:Effects]]
 
[[Category:Effects]]

Revision as of 01:55, 2 October 2011

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:
an effect is applied to the receiving object
Sent from:
engine
Sent to:
creature, placeable
Parameters:

Usage

case EVENT_TYPE_APPLY_EFFECT:
{

// insert event-handling code here

break;
}

Remarks

Relevant Eclipse engine code: <cpp>

   pEvent->SetType(CSSCRIPTEVENT_EVENTTYPE_RULES_APPLYEFFECT);
   pEvent->SetData(0, pEffect);

</cpp>

Use GetCurrentEffect to get the effect that was just applied (there is no GetEventEffect function) which can be decomposed to get the effect's creator, type, etc.