0 Favourites

How do I get 4 player multiplayer in a fighting game?

  • What would be the best method of doing so? It can be LAN or network or same machine with different controllers(if possible)

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Simply assign each player a different set of controls to use.

    If you want to get fancy and setup one function to handle all controls you can as well.

    Assign each player a "Player number" variable - 1, 2, 3, 4 etc.

    On any key pressed - call function "player action" (keyboard.lastKeyCode") (Player.playernumber)

    Function "player action" ("A", 1)

    If function.param (0) = "A")

    pick player object = function.param(1)

    play animation "punch"

    if function.param(0) = "left arrow"

    pick player object function.param(1)

    move player left

    So basically you are creating a function that will update a players movement/animations

    then telling it which player its effecting

    then you can recycle this function to work with any number of active players and movements. so that you are only coding it once, and splitting its duties among all players inputs

  • Could you put this into a capx? I'm having trouble understanding it in plain text. That would be amazing!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
763 305,702
asikanddestroy's avatar
asikanddestroy
Unread hot topic
232 177,683
Tetriser's avatar
Tetriser
Unread hot topic
224 49,520
ThePhotons's avatar
ThePhotons