Set character controls with families

0 favourites
  • 4 posts
From the Asset Store
Supports keyboard, mouse and gamepads. Supports several gamepads at once.
  • Hello again!

    This time I am working on spawning my characters and making it so they are controlled properly.

    I currently have 3 characters players can chose between and I already have it so player1 and player2 spawn correctly, however I need to have all of the player1 characters set to one control scheme, and the player2 characters set to another.

    Is there any way I can do this simply through families? Or will I have to make two copies of the character and with different controls?

    Edit: In fact, is there some way I can OnKeypress 1 set (character) into (family1)?

  • TheHat your characters for player one and player two are in the same family, or in seperate families?

    and what kind of controls they have? platform behavior, or custom (made in events)?

  • I think you can achieve this using the Dictionary object and keycodes.

    Add keys to the dictionary like this:

    Start of Layout

    Add key "p1Right" = 39

    Add key "p2Right" = 68

    Then a loop:

    Repeat 3 times

    + On key pressed: keycode Dictionary.Key("p"&LoopIndex&"Right")

    + Character.value("Player") = LoopIndex

    Move character right.

    I've done this once, I believe it was like this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey guys! Sorry for the late reply! I solved my own issue (though I now have a new issue I'm trying to solve haha)

    Anyway, I solved it by having player1 family use default controls, and player 2 family (both with the platform behavior) and have WASD simulate control!

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