I have multiple instances of the same object in a room. Let's call it a "point" for simplicity's sake.
Without making a new object and variable for every instance of the point, how can I make it so that when I leave the room and come back, the game remembers which points have been destroyed?
Remembering when an instance has been destroyed
Started by Ichenhamlish, Feb 26 2012 06:33 PM
7 replies to this topic
#1
Posted 26 February 2012 - 06:33 PM
#2
Posted 26 February 2012 - 06:39 PM
Just click the persistent checkbox on the settings tab for the room. I hope I helped.
#3
Posted 26 February 2012 - 07:05 PM
Oh no, it was really that simple? I'm facepalming so hard right now.Just click the persistent checkbox on the settings tab for the room. I hope I helped.
Thank you xD
#4
Posted 26 February 2012 - 07:29 PM
Haha no problem!
#5
Posted 26 February 2012 - 07:36 PM
Sorry, an additonal question. If rooms are persistent, how can I get a certain object to run its creation event every time a room is visited?
#6
Posted 26 February 2012 - 08:10 PM
Try putting its creation code in the Room Start trigger instead and see if that helps. I'm not sure if persistent rooms will bypass that trigger or not, though.
#7
Posted 26 February 2012 - 08:21 PM
Yeah, that did it. Thanks a lot
#8
Posted 26 February 2012 - 08:30 PM
Oh yeah, just a quick warning about that method, though.
Room Start triggers early on but still pretty late in the sequence of events. Read up on the order of event sequences in GM, because trying to reference a variable in an event that triggers before the Room Start event can cause errors.
Room Start triggers early on but still pretty late in the sequence of events. Read up on the order of event sequences in GM, because trying to reference a variable in an event that triggers before the Room Start event can cause errors.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











