Hello
I know this is probably a stupid question, But I have a variable called the victorytimer(0), the victorytimer(0)=1000 by default, and if the players objects come into contact with the enemies, the victorytimer will begin to go down, if it reaches 0 then the player wins. Now here is the problem, I want victory timer to go down only when the player is colliding with one of the enemies objects, and if the player stops colliding, the victory timer should go back up to 1000, and if the player wins, the victorytimer should go back up to 1000 so that it can be used at another time. I am using the following code to do most of this....
ships=60 to 63
if object collision(ships,planet)>0
victorytimer(0)=victorytimer(0)-1
if object collision(ships,planet)>0 and victorytimer(0)=0
planet=1 `a value of 1 means the planet belongs to the player now
endif
endif
next ships
Of course that does not revert the victorytimer back to 1000 if...
the player is not in contact with the planet
the player has already captured the planet
both of those things should revert the victorytimer back to 1000
but I cannot figure out how. And if I put in an if statement like...
if planet(0)=1
victorytimer(0)=1000
endif
then I can no longer manipulate the victorytimer, because it is in a loop, and holds it at a constant value. This problem is hendering other areas of my project,because I was going to give the player more of a certain resource (stradegy game) if they capture planets, but if I use an if statement like...
if planet(0)=1
money(0)=6000
endif
well, then I won't be able to manipulate that variable any more, because commands like this wont work anymore....
money(0)=money(0)-1
the same applies to the victory timer.
So I need help!
Guns arn't the problem, people are the problem, shoot all the people and guns arn't a problem anymore.