Changing Actor colour seems to be random? Help!
New to the GS world and have hit a stumbling block that I hope you can help with
I'm trying to create an actor that when the mouse clicks on it, it changes colour.
Then if you click on it again, it changes back.
So, it starts white. If I click it, it turns black, then if I click it again, it turns white.
I've used When ALL touch is PRESSED do:
Set game.SelectedTile1 To 1-game.SelectedTile1
(game.SelectedTile1 is an integer value)
Then I've got it where:
If game.SelectedTile1 = 0
The good news is that it works. If I click it, it does indeed change from white to black and and back again.
However, the issue is that it seems to be random. If I click it once, nothing. Twice, nothing, third time it works. Once, nothing, twice it works; and so on.
My question is why and what am I doing wrong?