Code:
I want to make a "single player" game to play with my friends offline that would work like a board game.
I'm not entirely sure though how I would be able to define the number of players when the game starts, then be able to switch between them.
Any pointers or even links would be greatly appreciated.
Problem description:
In response to Pongy
|
|
hm?
If you wanted to specify which player's turn it is, you could just use a numeric value for representation. var/turn = 1 //Player 1's turn. |
In response to Konlet
|
|
It would help to actually fill the players list at some point in that example.
|
Well, you can do something like this:
That'll define a global list accessible from any proc which can be used to specify a player and define the number of players.
That's an easy way to utilize multiple players with a list. If you'd like to grab a player from the list, do like so: