EVENT GAME: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
m Reverted edits by 201.21.218.199 (Talk); changed back to last version by TX
Line 1: Line 1:
EVENT_GAME is an [[event]] that 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.
EVENT_GAME is an [[event]] that 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.
Very usefull, you can instead of modding original CON files, use <i>ifactor MYACTOR</i> to edit actors or <i>ifactor APLAYER</i> for add codes as if was added on APLAYER code without editing GAME.CON.
Most important, can edit hard-coded actor without breaking it using the <i>[[actor]] MYENEMY</i> code.
onevent EVENT_GAME
  ifactor RECON
    ifai 0
      strength 50
  ifactor RPG
    ifspawnedby BOSS2
      spawn SMALLSMOKE
endevent
This will change RECON strength and adding a trail to the RPG that Cycloid Emperor shoots.


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

Revision as of 19:50, 28 December 2006

EVENT_GAME is an event that 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.