RETURN: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Jblade (talk | contribs)
No edit summary
Mblackwell (talk | contribs)
mNo edit summary
Line 4: Line 4:


EXAMPLE:
EXAMPLE:
<pre>
onevent EVENT_GETLOADTILE
    setvar RETURN <value>
endevent
</pre>


onevent GETLOADTILE
In this case, RETURN "return"s the load screen background number into the var RETURN, setting it to something else changes it, changing the background for the loading screen.
 
setvar RETURN <value>


EXAMPLE 2:
<pre>
onevent EVENT_FIRE
    setvar RETURN -1
endevent
endevent
</pre>


In this case, setting RETURN to -1 cancels EVENT_FIRE, causing the player to no longer be able to use a weapon.


In this case, RETURN, well, 'return's the load screen background number into the var RETURN, setting it to something else changes it, changing the background for the loading screen.
EXAMPLE 3:
 
<pre>
EXAMPLE 2:
 
espawn LIZTROOP
espawn LIZTROOP
setactor[RETURN].pal 21
setactor[RETURN].pal 21
setactor[RETURN].extra 400
setactor[RETURN].extra 400
</pre>


In this case, RETURN will allow you to spawn an Assault Captain [LIZTROOP, Pal 21] with 400 health instead of 60 health.


In this case, RETURN will allow you to spawn an Assault Captain [LIZTROOP, Pal 21] with 400 health instead of 60 health.


[[Category:Pre-defined gamevars]]
[[Category:Pre-defined gamevars]]

Revision as of 15:43, 30 July 2011

The 'SuperVar'!!

This variable is constantly used to 'return' important values, such as those in events.

EXAMPLE:

onevent EVENT_GETLOADTILE
    setvar RETURN <value>
endevent

In this case, RETURN "return"s the load screen background number into the var RETURN, setting it to something else changes it, changing the background for the loading screen.

EXAMPLE 2:

onevent EVENT_FIRE
    setvar RETURN -1
endevent

In this case, setting RETURN to -1 cancels EVENT_FIRE, causing the player to no longer be able to use a weapon.

EXAMPLE 3:

espawn LIZTROOP
setactor[RETURN].pal 21
setactor[RETURN].extra 400

In this case, RETURN will allow you to spawn an Assault Captain [LIZTROOP, Pal 21] with 400 health instead of 60 health.