computer's turn

azavegaazavega Member Posts: 362
edited November -1 in Working with GS (Mac)
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

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Create an attribute that states if the ball is still moving. A boolean would be good.
    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.
  • design219design219 Member Posts: 2,273
    Uhmmm, if I had a little question about the new publishing system, would you reply code monkey?
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    @design219 I'm here to answer tech questions. I can't promise that I will be able to answer it. Although I have emailed you back on your support question as much as I can.
  • design219design219 Member Posts: 2,273
    CodeMonkey said:
    @design219 I'm here to answer tech questions.

    Yes, I know. It's just I'm sure you are aware how stressed out people are here about the lack of communication from GameSalad about our concerns over this new publishing method. I know you are probably not authorized to talk about it, but I thought I'd give it a shot.
  • azavegaazavega Member Posts: 362
    thanks CodeMonkey i'll give it a try
  • BeyondtheTechBeyondtheTech Member Posts: 809
    design219 said:
    Yes, I know. It's just I'm sure you are aware how stressed out people are here about the lack of communication from GameSalad about our concerns over this new publishing method. I know you are probably not authorized to talk about it, but I thought I'd give it a shot.

    Good try, design219!

    You should have put it into code!
Sign In or Register to comment.