moveto not working with variables

if I have a door that leads to another part of the game and I have it set so that when
collision on any side of door
keydown a
once I press the a key... well I won't fully describe the chaos that follows, but no matter the code that has the moveto dependent on a variable, the event actor just moves back to where it was created! how do I get this to work?
collision on any side of door
- Code: Select all
door_open = 1;
keydown a
- Code: Select all
if(door_open==1)
moveto wherever;
door_open = 0;
once I press the a key... well I won't fully describe the chaos that follows, but no matter the code that has the moveto dependent on a variable, the event actor just moves back to where it was created! how do I get this to work?