EVENT GAME: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Fox (talk | contribs)
No edit summary
Line 3: Line 3:
This [[event]] is triggered once per tic per sprite in the game. The gamevar [[THISACTOR]] refers to the ID of the actor executing the code.  Thus, it takes the value of each actor in the game.
This [[event]] is triggered once per tic per sprite in the game. The gamevar [[THISACTOR]] refers to the ID of the actor executing the code.  Thus, it takes the value of each actor in the game.


All sprites are processed in the following fashion:
Typically this event is processed after hard-coded effects and the actor code (with [[actor]] or [[useractor]]), while [[EVENT_PREGAME]] is processed before.


#[[EVENT_PREGAME]]
Unlike [[actor]] or [[useractor]], EVENT_GAME and EVENT_PREGAME are triggered the same tic the sprite is loaded/spawned, but are processed after [[EVENT_LOADACTOR]] or [[EVENT_EGS]].
#hardcoded stuff
#EVENT_GAME
 
EVENT_GAME is generally sufficient for coding needs but EVENT_PREGAME has some specific uses.
 
Unlike [[actor]] or [[useractor]], EVENT_GAME is triggered the same tic the sprite is loaded/spawned.


[[Category:Events]]
[[Category:Events]]

Revision as of 13:28, 20 July 2014

EVENT_GAME is a Game Event.

This event is triggered once per tic per sprite in the game. The gamevar THISACTOR refers to the ID of the actor executing the code. Thus, it takes the value of each actor in the game.

Typically this event is processed after hard-coded effects and the actor code (with actor or useractor), while EVENT_PREGAME is processed before.

Unlike actor or useractor, EVENT_GAME and EVENT_PREGAME are triggered the same tic the sprite is loaded/spawned, but are processed after EVENT_LOADACTOR or EVENT_EGS.