Hello, everyone.
I'm trying to change things by changing between rooms. Basically, I have my "obj_door" that simply does "room_goto()", but I need this to move objects or trigger events. What I have thought is to add "with (obj_player)" after changing the room, but I realised that it doesn't change the room in that moment, so it only works if the obj_player is already there in the room and is persistent, but if I want to move objects in another room, they won't be there. I thought I could create an object after changing the room, so it would be created in the next room, not in current, it worked, but I don't feel confortable though, because technically the room change is until the end of the step, so it's uncertain where I'm executing that code. Anyway, the big deal is when I need to move instances in the next room, I don't know how to track them. The room editor has an ID for each instance, but I don't know if the "inst_????????" it's an actual variable, constant, or should I use it as a string. And it is supposed to be used only in the same room, so, if I'm using the creation code on another room, I don't think it will work. And finally where should I put the code, I don't need the door to change position always, and the creation code is only that, "Creation", if I need to place additional code in the event when the room is changed, where should I put that...? Like if I need to change view or do something else, but only once, I think my door object would be filled with one time code, and then, it would be hard to know when to call that code, and hard to read it.
So, as you can see, this is a mess, and I don't really have an idea of where to start. So I accept any suggestion.
I'm trying to change things by changing between rooms. Basically, I have my "obj_door" that simply does "room_goto()", but I need this to move objects or trigger events. What I have thought is to add "with (obj_player)" after changing the room, but I realised that it doesn't change the room in that moment, so it only works if the obj_player is already there in the room and is persistent, but if I want to move objects in another room, they won't be there. I thought I could create an object after changing the room, so it would be created in the next room, not in current, it worked, but I don't feel confortable though, because technically the room change is until the end of the step, so it's uncertain where I'm executing that code. Anyway, the big deal is when I need to move instances in the next room, I don't know how to track them. The room editor has an ID for each instance, but I don't know if the "inst_????????" it's an actual variable, constant, or should I use it as a string. And it is supposed to be used only in the same room, so, if I'm using the creation code on another room, I don't think it will work. And finally where should I put the code, I don't need the door to change position always, and the creation code is only that, "Creation", if I need to place additional code in the event when the room is changed, where should I put that...? Like if I need to change view or do something else, but only once, I think my door object would be filled with one time code, and then, it would be hard to know when to call that code, and hard to read it.
So, as you can see, this is a mess, and I don't really have an idea of where to start. So I accept any suggestion.