EVENT PREGAME: Difference between revisions
Mblackwell (talk | contribs) Created page with "''this page is a stub'' ---- All sprites are processed in the following fashion: 1. EVENT_PREGAME<br> 2. hardcoded stuff<br> 3. EVENT_GAME<br> One potential use is to exa..." |
Doom64hunter (talk | contribs) m Previous author just copy pasted the EVENT_GAME text and forgot to edit it, wtf? |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{EventTable|1=EVENT_PREGAME|2=closest player to sprite|3=current sprite|4=0 values}} | |||
EVENT_PREGAME is a [[EDuke32_event_list|Game Event]]. | |||
This [[event]] is triggered once per tic per sprite in the game, if and only if said sprite does not have [[spriteflags|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_PREWORLD]], but before any of the engine code pertaining to sprites and actors, such as <code>MoveActors()</code>, <code>MovePlayers()</code>,<code>MoveFallers()</code> etc. has executed. It also occurs before all CON code defined using [[actor]] or [[useractor]]. | |||
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]]. | |||
[[Category:Events]] |
Latest revision as of 00:08, 5 February 2022
Event ID | player# | THISACTOR | RETURN | |
---|---|---|---|---|
EVENT_PREGAME | closest player to sprite | current sprite | 0 values |
EVENT_PREGAME 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_PREWORLD, but before any of the engine code pertaining to sprites and actors, such as MoveActors()
, MovePlayers()
,MoveFallers()
etc. has executed. It also occurs before all CON code defined using actor or useractor.
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.