Turn System

JenguinieJenguinie Member Posts: 4
edited November -1 in Working with GS (Mac)
Do any of you out there know how to make a working turn system on GameSalad? See, each player has to connect one dot per turn in a field of dots to get to the other player's dot on the other side(starting point). I thought it might work by telling the actor(or somehow system) to only move one player at a time(a turn). Do any of you have solutions?

Comments

  • giacomopoppigiacomopoppi Member, PRO Posts: 914
    It should be fairly easy.

    make an attribute called playerTurn (integer) set it to 1.

    create rule
    when game.playerTurn = 1
    connect dot
    then
    change attribute game.playerTurn = 2

    Create rule
    when game.playerTurn =2
    connect dot
    then change attribute game.playerTurn = 1

    Is that what you are looking for?
  • rlehmrlehm Member Posts: 320
    You may also be requesting AI so the "computer player" actually tries to win.
  • JenguinieJenguinie Member Posts: 4
    Sounds good, giacomopoppi, but I don't get how I would connect the dot in your description. How would I do so?
  • JenguinieJenguinie Member Posts: 4
    giacomopoppi said:
    It should be fairly easy.

    make an attribute called playerTurn (integer) set it to 1.

    create rule
    when game.playerTurn = 1
    connect dot
    then
    change attribute game.playerTurn = 2

    Create rule
    when game.playerTurn =2
    connect dot
    then change attribute game.playerTurn = 1

    Is that what you are looking for?

    I think that sounds pretty good, but would this work in a situation where to move from dot to dot you have to touch the dot you want to go to?
Sign In or Register to comment.