how to make multiple actors take turns to move?

I am doing a game that have multiple players, like snake and ladders, now I can make one actor move when dice is pressd and released, but how to make actor2 move when the next time dice is pressde? I mean actor1 dont move, then next time actor3 move. Anybody knows how to do this? please help me, thank a lot :)

Comments

  • carlblanchetcarlblanchet Member Posts: 755
    Make an game integer attribute, lets call it WhichPlayer

    In the Dice:
    When dice is pressed
    Change attribute WhichPlayer to (WhichPlayer+1)%2

    In the Actor1:
    When WhichPlayer is = 0
    Move Actor1

    In the Actor2:
    When WhichPlayer is = 1
    Move Actor2

    etc.
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    @venenali89 still working on your snake and ladder?
    I was trying to figure out how to move the pawns on the maps properly... somehow i got into some trouble lols. how's your side doing?
Sign In or Register to comment.