Okay this is a very strange questions but bear with me. I have a trigger object (a block) that causes a map entity to tilt roll or pan. Currently the code checks to see what the value of the trigger is (IE if 1 do this if 2 do that) both values cause the map entity to be positioned in a certain manner.

Both work if they are touched first. However I'm trying to "reset" the room back to its original position if the player hits one of the switches. The point that I'm at now is that if the player hits the "reset" switch it causes the action I want. However if the player hits the "roll" switch and THEN tries to hit the "reset" switch nothing happens. The room just stays in one position. I checked to make sure that the value is being changed. It is but nothing happens. Is it because I can't change to position of a map entity more than once?


Here's my code example


action room1rotate // this is the first rotation in the demo
{


while(player_close ==0){wait(1);}
// the way this should work is that it checks to see if the player is clse
// this causes the first room to go to its left 90 degrees this makes the player be able to go into the next room
// my.tilt = my.tilt - 180 * time; // tilt is up pan is horizontal
player.z += 5;
player.x -= 20;
// my.event = roomreset;




if player_close == 1
{

my.tilt = my.tilt + 180 * time;

}

if player_close == 2
{
snd_play (gear_wav, 100, 0);
my.tilt -= 180;
}



}

and these are the triggers driving the action:

action trap_trigger
{
my.enable_touch = on;
// my.event = trap_player;
while(player == null){wait(1);}
while(vec_dist(player.x, my.x) > 100) {wait(1);} // player with the 40
player_close = 1;

}

action room2flip2reset
{
my.enable_touch = on;

while(player == null){wait(1);}

while(vec_dist(player.x, my.x) > 100) {wait(1);} // player with the 40

player_close = 2;
//my.x += 500;

}