EVENT ENTERLEVEL

From EDukeWiki
Revision as of 06:48, 5 February 2022 by Doom64hunter (talk | contribs) (This description was wrong, the event actually does something completely different to EVENT_PRELEVEL)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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