GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Turn System

JenguinieJenguinie Posts: 4Member
edited 11:50AM 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 Posts: 914Member, PRO
    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 Posts: 320Member
    You may also be requesting AI so the "computer player" actually tries to win.
  • JenguinieJenguinie Posts: 4Member
    Sounds good, giacomopoppi, but I don't get how I would connect the dot in your description. How would I do so?
  • JenguinieJenguinie Posts: 4Member
    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?
This discussion has been closed.