room manipulation

T

Theghost

Guest
Hello there

My game requires me to restart a room where my object is not in. How do I do this?

dear Theghost
 
D

dannyjenn

Guest
If I understand what you're asking, all you need to do is call room_restart() from a different object (one that is in the room).

If there are no instances in the room at all, I don't think you can restart it.
 
J

Justin Lillico

Guest
To confirm the above, the only code I'm aware of you get access to without an instance object is the room create code and that's no good to you unless you want to resrart before the room is even on screen.
 

curato

Member
you just need a manager object. I almost always have one to manage things that don't pertain to a particular thing just the game as a whole. Have it check in the step even or in an alarm if even if the object exists . If not restart the level. If it is like the player died or something you could just restart the room as part of your death code instead of removing the object.
 
N

NeZvers

Guest
I usually have blank room at the top of resource tree and have one instance of oManager object, that spawn all other needed instances (came manager/ sound manager/ input manager/ etc).
 
Top