I´m working on a JRPG game. My character has an instance variable called ShipActive, which determines if it must load the character animations or the ships animations. My code is written like this : there is a condition that checks that if the Z key is pressed and the player is overlapping a dock (where you can take a ship). Inside this condition there are two subconditions: if ShipActive is 0, it changes to 1, and if it´s 1, it changes to 0. But the problem is that this isn´t working, and I can see in the debugger that the variable doesn´t change.
I have tried removing the overlapping condition and it doesn´t work, and if I remove the subconditions and put one of the actions in the main condition, it works. For example, the initial value of ShipActive is 0, and if I put the action that changes the variable to 1 inside the condition, it works perfectly. So I suppose there must be a problem with the subconditions somewhere. So I´m asking if you can see if I am doing something wrong.