ResetRoom (int room_number)
Discards all the data that the engine has in memory about when the player
last visited ROOM_NUMBER, and resets it as if they'd never been there. The
next time the player goes to that room, all the objects and scripts will
be in their initial state (as set up in the editor), and not how they were
when the player left the room. The "First time enters room" event will be
run when they enter this room again.
This function is useful if you want to have a "View intro" option to allow
the player to watch an intro again - this function can reset all the
objects in the intro rooms to their starting positions.
NOTE: You cannot reset the current room (ie. the room that the player is in).
Example:
ResetRoom(0);
will reset the intro room so it can be played again if the player wants to.
See Also: HasPlayerBeenInRoom
|