M
mst3kdavid
Guest
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.
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)
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.
Code:
if global.redturn > 2
{
movedthisturn=0
global.redturn=0
global.greenturn=1
}
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)