EVENT PREGAME: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Mblackwell (talk | contribs)
mNo edit summary
Fox (talk | contribs)
No edit summary
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''this page is a stub''
EVENT_GAME is a [[EDuke32_event_list|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.


All sprites are processed in the following fashion:
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]].


1. EVENT_PREGAME<br>
One potential use specifically for EVENT_PREGAME is to examine struct values which are clobbered by commands such as [[ifhitweapon]]/[[ifwasweapon]].
2. hardcoded stuff<br>
3. EVENT_GAME<br>


One potential use is to examine values which are clobbered by commands such as [[ifhitweapon]]/[[ifwasweapon]].
[[Category:Events]]

Revision as of 13:32, 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. 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.