Eventloadactor: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
The eventloadactor blocks run when an actor is loaded into the map -- despite the name, it is not a game event but rather an entirely separate type of block ended with enda. It is most often used for moving settings out of a [[sprite]]'s hitag or lotag and into a [[gamevar]] before they have undesirable hardcoded effects. | |||
<pre> | |||
gamevar ZERO 0 0 | |||
gamevar HITAGSAVED 0 2 | |||
gamevar LOTAGSAVED 0 2 | |||
eventloadactor MYSPRITE | |||
{ | |||
getactor[THISACTOR].hitag HITAGSAVED | getactor[THISACTOR].hitag HITAGSAVED | ||
getactor[THISACTOR].lotag LOTAGSAVED | getactor[THISACTOR].lotag LOTAGSAVED | ||
setactor[THISACTOR].hitag ZERO | setactor[THISACTOR].hitag ZERO | ||
setactor[THISACTOR].lotag ZERO | setactor[THISACTOR].lotag ZERO | ||
} | |||
enda | |||
</pre> |
Revision as of 13:40, 15 September 2005
The eventloadactor blocks run when an actor is loaded into the map -- despite the name, it is not a game event but rather an entirely separate type of block ended with enda. It is most often used for moving settings out of a sprite's hitag or lotag and into a gamevar before they have undesirable hardcoded effects.
gamevar ZERO 0 0 gamevar HITAGSAVED 0 2 gamevar LOTAGSAVED 0 2 eventloadactor MYSPRITE { getactor[THISACTOR].hitag HITAGSAVED getactor[THISACTOR].lotag LOTAGSAVED setactor[THISACTOR].hitag ZERO setactor[THISACTOR].lotag ZERO } enda