1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

room manipulation

Discussion in 'Programming' started by Theghost, Feb 13, 2019 at 7:52 PM.

  1. Theghost

    Theghost Member

    Feb 1, 2019
    Hello there

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

    dear Theghost
  2. dannyjenn

    dannyjenn Member

    Jul 29, 2017
    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.
    Theghost likes this.
  3. Justin Lillico

    Justin Lillico Member

    Oct 13, 2018
    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.
  4. curato

    curato Member

    Jun 30, 2016
    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.
  5. NeZvers

    NeZvers Member

    Mar 24, 2018
    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).

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice