Onevent: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
Redirected page to Category:Event manipulation
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
onevent <[[event]] name> { code } [[endevent]]
#REDIRECT [[:Category:Event manipulation]]


Used outside of all [[actor]]s. When the [[event]] called <[[event]] name> occurs, any following code occurs. [[endevent]] is used to end the statement. Set the [[gamevar]] RETURN to -1 inside an onevent statement to cancel to effects of the [[event]].
[[Category:EDuke commands]]
 
[[Category:Event manipulation]]
 
Example code:
 
<pre>
gamevar MYMEDPACK 100 1
 
onevent EVENT_TURNAROUND
{
    palfrom 32 0 0 32
    addphealth 5
    subvar MYMEDPACK 5
    setvar RETURN -1
}
[[endevent]]
</pre>
 
 
 
See the [[EDuke32 event list]] for a list of all currently valid [[event]]s in Eduke32.

Latest revision as of 17:19, 3 April 2015