• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

GML [solved] turn based strategy game giving me minor problems



Each player can move two objects per turn.

The first object to move can not move even when it is that players turn
The second object moves just fine once that players turn comes around.
This leads me to believe that the code below is not being referenced by the first object moved and only the second but I can not figure out why. (can only one object call a global variable at a time?)

I've tested all the code that calls the variable movedthisturn and the code below seems to be the source of my problem.
if global.redturn > 2
Extra info:
The variable movedthisturn is changed in the code above, when it is moved to a seperate room, and moved to another tile.
If an object is moved to a separate room it behaves the same as if it were the first object mentioned above regardless of if it was moved first or second. (other objects that player owns can still move)


I just had to many instances calling my global variable which for some reason prevented some objects from working correctly