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

0 favourites
  • 3 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • What would be the best method of doing so? It can be LAN or network or same machine with different controllers(if possible)

  • 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

  • Try Construct 3

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

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