How do I choose between 1 or 2 players

Get help using Construct 2

Post » Wed Jul 06, 2016 10:26 pm

I've looked everywhere (at least i think i have) and all examples, tut's and posts show hot to switch between players or 2 players playing at the same time onscreen. How do i create the 1 or 2 player events?

i,e: if i want to play alone, i choose 1 player. If i want to play with someone else (turn based) i choose 2 player, and if player 1 dies it will become player 2's turn?

If anyone can point me to examples or help with this, greatly appreciated.
Posts: 664
Reputation: 14,112

Post » Thu Jul 07, 2016 11:17 am

IT works like most things... you would need a set of variables to tell the game who's turn it is, etc.

Global Variable - PlayerTurn = 1

[Press move right]
---- player 1 moves right

[Player 1 dies]
--- set PlayerTurn=2

[Press move right]
---- player 2 moves right

[Player 2 dies]
--- set PlayerTurn=1

The same would be done for picking how many players you want;

Global Variable - NumPlayers=0

[Click button for one player]
--- set NumPlayers=1

[Click button for two player]
--- set NumPlayers=2

You would use your NumPlayers variable setting to help conditions with the first set of pseudo events I wrote up there^

[Player 1 dies]
--- set PlayerTurn=2
--- set PlayerTurn=1
--- respawn player

Tired of crappy file hosts that are crappy? Get DROPBOX -
Posts: 3,032
Reputation: 30,999

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests