W
Wild_West
Guest
Alright so I've tried everything can think of for this and it'as not working.
What I'm trying to do is make a setup of pairs of doors. so I can walk up to one, press up and go to the second door of the pair. But every time I set it up it only works when going back from door 2 to door 1, and door 1 just keeps setting me at door 1. UNLESS I only have code to travel from one door, then door 1 does work. what is the deal ?
What I'm trying to do is make a setup of pairs of doors. so I can walk up to one, press up and go to the second door of the pair. But every time I set it up it only works when going back from door 2 to door 1, and door 1 just keeps setting me at door 1. UNLESS I only have code to travel from one door, then door 1 does work. what is the deal ?
Code:
if( gamepad_button_check_released( 0, gp_padu ) )
{
with( other )
{
switch( instance_number( door_obj ) )
{
case 2 :
if( place_meeting( x, y, other ) )
{
var door_2 = instance_find( door_obj, 1 );
x = door_2.x; y = door_2.bbox_bottom;
}
if( place_meeting( x, y, other ) )
{
var door_1 = instance_find( door_obj, 0 );
x = door_1.x; y = door_1.bbox_bottom;
}
}
}
}