room_first

This read-only variable returns the index of the very first room in the game (this is defined by the order in which the rooms appear in the Room Manager and not by the order in which they were created).

 

Syntax:

room_first;

 

Returns:

Room Asset

 

Example:

if (lives < 1)
{
    room_goto(room_first);
}

The above code will check the "lives" variable and if it is less than 1 go to the first room in the game.