Taking Turns

You must understand the Game Editor concepts, before post here.

Taking Turns

Postby barney12345 » Sat Jun 08, 2013 8:41 am

Hello
I'm making a multiplayer strategy game and I was making each players move possible when I realised that one player could non stop have their go. This would be fine as I have developed something to signal whose go it is, but I think this may be required. Any ideas in how to restrict whose go it is?
Darth Vader called... he wants his cookies back
User avatar
barney12345
 
Posts: 122
Joined: Wed Nov 07, 2012 6:52 am
Location: A land down under
Score: 4 Give a positive score

Re: Taking Turns

Postby skydereign » Sat Jun 08, 2013 9:13 am

The most straightforward solution is to have a variable hold which player's turn it is. Depending on how you do turns, this often will be enough.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Taking Turns

Postby barney12345 » Thu Jun 20, 2013 8:26 am

Can you help with this? please? :?: :?: :?: :?: :?:
Darth Vader called... he wants his cookies back
User avatar
barney12345
 
Posts: 122
Joined: Wed Nov 07, 2012 6:52 am
Location: A land down under
Score: 4 Give a positive score

Re: Taking Turns

Postby skydereign » Thu Jun 20, 2013 6:24 pm

You are going to have to elaborate on what you don't understand. I gave you a solution that works in many cases. All you need to do is have a variable that holds which player's turn it is. If it is 0, than the first player can move. This can be achieved by an if statement in that player's units making sure they can only be moved on the proper turn.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron