Hey guys! I’m making (like the title states…) a turn-based local multiplayer game and have some doubts about how to setup the turns logic. I’ve searched for similar topics on the forums but couldn’t find.
So, how do I go about setting up the turns for two players? I have one Player Controller controlling two pawns (actually it’s currently controlling only one hehe). I’ve setup Action Points and each time the pawn moves 100units (1 tile) it spends 1 AP. Once AP is zeroed out, I’ve setup some bools for isPlayer0Turn and isPlayer1Turn and alternate their value. Don’t know how to make the Controller control the other pawn when the turn shifts. I’ve set up the players indexes (player 0 and player 1) but not sure how to use them (e.g. increase and subtract on each player’s turn). The input is going to be only touch, so it has a single button on screen to play the dice and the pawn moves automatically.
Here are some screenshots:
Player Controller Graph
Function inside PlayerController for moving the pawn
That’s it, thanks a lot guys! =D