room.getAge() function



  • I think it would be useful to have a getAge() function that returns the number of ticks that have passed since that room was created. This can apply both to survival rooms (created every time a new game of survival starts) and to rooms in the MMO.

    I think this would allow for scripts to easily recognize when they are in a new room, and thus are starting a new game. Since a script may not be running in any particular room when that room is created, the script cannot keep track of the room's proper age on its own. This is why I believe a builtin is required.


  • Dev Team

    For Survival there is one already: Room.survivalInfo.score.
    For MMO, it doesn't make any sense, because it would be the same for all rooms, and equals to Game.time.