EVENT ENTERLEVEL: Difference between revisions
No edit summary |
Doom64hunter (talk | contribs) This description was wrong, the event actually does something completely different to EVENT_PRELEVEL |
||
Line 1: | Line 1: | ||
{{EventTable|1=EVENT_ENTERLEVEL|2=iterated, see below|3=[[i|player->i]]|4=1 value}} | |||
EVENT_ENTERLEVEL is a [[EDuke32_event_list|Game Event]]. | EVENT_ENTERLEVEL is a [[EDuke32_event_list|Game Event]]. | ||
This [[ | This event is triggered at the very end of the level setup, after all sprites, sectors, walls and players have been initialized, and directly after the game timer is started. | ||
The [[RETURN]] variable controls a special function for this event. By default, the event simply executes once, using the first player in the connect list as the current player (which in a singleplayer game is equivalent to [[myconnectindex]]). | |||
However, by setting [[RETURN]] to a non-zero value, the event will trigger repeatedly, iterating over every single player that is present in the current game, and setting it as the current player. Therefore, to iterate over all players, you will need to set [[RETURN]] to a non-zero value in each execution of the event. | |||
If you need to execute code a single time before any level content is initialized, see: [[EVENT_PRELEVEL]] | |||
[[Category:Events]] | [[Category:Events]] |
Latest revision as of 06:48, 5 February 2022
Event ID | player# | THISACTOR | RETURN | |
---|---|---|---|---|
EVENT_ENTERLEVEL | iterated, see below | player->i | 1 value |
EVENT_ENTERLEVEL is a Game Event.
This event is triggered at the very end of the level setup, after all sprites, sectors, walls and players have been initialized, and directly after the game timer is started.
The RETURN variable controls a special function for this event. By default, the event simply executes once, using the first player in the connect list as the current player (which in a singleplayer game is equivalent to myconnectindex).
However, by setting RETURN to a non-zero value, the event will trigger repeatedly, iterating over every single player that is present in the current game, and setting it as the current player. Therefore, to iterate over all players, you will need to set RETURN to a non-zero value in each execution of the event.
If you need to execute code a single time before any level content is initialized, see: EVENT_PRELEVEL