How do I choose between 1 or 2 players

0 favourites
  • 2 posts
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)