Zabicka
Member
I have one object that is called "obj_door", I made a variable in "variable definitions" called "room_next" in the door object and it's a boolean, I have two of the door objects in the same room and I want the player to spawn on top of the door that is "false", and the second door with "true" to just teleport you to another room.
So I need to get the x and y positions of the door with "false" when the room starts, but I don't know how to get these positions.
I tried this in the room start event in the player object, but it doesn't work.
So I need to get the x and y positions of the door with "false" when the room starts, but I don't know how to get these positions.
I tried this in the room start event in the player object, but it doesn't work.
Code:
if (instance_exists(obj_door)) {
if (obj_door.object_index == false) {
x = obj_door.x;
y = obj_door.y;
}
}