EVENT GAME

From EDukeWiki
Revision as of 00:08, 5 February 2022 by Doom64hunter (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Event ID player# THISACTOR RETURN
EVENT_GAME closest player to sprite current sprite 0 values

EVENT_GAME is a Game Event.

This event is triggered once per tic per sprite in the game, if and only if said sprite does not have SFLAG_NOEVENTS set. The gamevar THISACTOR is the current spriteNum, while the current player is the closest player to said sprite.

This event occurs after EVENT_PREGAME, and after EVENT_WORLD. Furthermore, it occurs after all engine code pertaining to sprites and actors, such as MoveActors(), MovePlayers(),MoveFallers() etc. has executed. The event also occurs after all CON code defined using actor or useractor, while EVENT_PREGAME is processed before. Therefore, EVENT_GAME can be used to override these effects.

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.