From EDukeWiki
Revision as of 13:32, 20 July 2014 by Fox (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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. Thus EVENT_GAME can be used to override these effects. Generally EVENT_GAME is sufficient for coding needs but EVENT_PREGAME has some specific uses.

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.

One potential use specifically for EVENT_PREGAME is to examine struct values which are clobbered by commands such as ifhitweapon/ifwasweapon.