computer's turn
azavega
Member Posts: 362
Hi again... Got a problem trying to make the computer plays after me... the point is i trow and object and when its stop its computer's turn, but while the object is moving i can touch it and trow again and again, so i want to be able to disconnect some how the posibility of touching the object again till the computer's finish his turn... any help?
Comments
Also an attribute that tracks whose turn it is. An integer would be better than a boolean in this case. (0=Player1, 1=Player2) Then you can switch off who is Player1
game.ObjectIsMoving
game.PlayerTurn
So you would have a rule that check if the object is still moving. Probably in the thrown actor. When it is stopped, change the game.PlayerTurn value. Change Attribute: game.PlayerTurn = 1-game.PlayerTurn
Also change the game.ObjectIsMoving to False.
Whatever mechanism that allows you to throw the object, add a rule that checks if the game.ObjectIsMoving is false and it is your turn.
You should have put it into code!