Difference between revisions of "Event Handler Functions"
Jump to navigation
Jump to search
m
no edit summary
imported>8asrun6aer m |
imported>8asrun6aer m |
||
Line 60: | Line 60: | ||
For instance, to handle events involving the player being hit by another actor, use: | For instance, to handle events involving the player being hit by another actor, use: | ||
<pre>SetEventHandler "OnHit", yourScript, ref::playerRef</pre> | <pre>SetEventHandler "OnHit", yourScript, "ref"::playerRef</pre> | ||
To handle events in which the player, and only the player, hits anyone else, use: | To handle events in which the player, and only the player, hits anyone else, use: | ||
<pre>SetEventHandler "OnHit", yourScript, object::playerRef</pre> | <pre>SetEventHandler "OnHit", yourScript, "object"::playerRef</pre> | ||
To handle the player being affected by a Restore Health magic effect, use: | To handle the player being affected by a Restore Health magic effect, use: | ||
<pre>SetEventHandler "OnMagicEffectHit", yourScript, ref::playerRef object::"REHE"</pre> | <pre>SetEventHandler "OnMagicEffectHit", yourScript, "ref"::playerRef "object"::"REHE"</pre> | ||
== Notes == | == Notes == |