EVENT ENTERLEVEL

From EDukeWiki
Jump to navigation Jump to search
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