Adding a second player efficiently?

0 favourites
  • 3 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • I'm making a simple game using the Physics Ragdoll example from the store but using a controller instead of the mouse and so far everything is going great! But I'd like to add a second player.

    In the past I'd just clone all the objects required, call them object_p2 and then copy the code used for object_p1 and change items and controllers used to suit p2. It works just fine but it is a chore, especially if I want to add a p3 or p4.

    What I'd ideally like to do is use the same objects and code used but be able to apply it to other players but I don't really know how.

  • you can create a family for the object and create a variable that when creating the object it assumes the value of the player and comparing this value it assumes the movements according to the player

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had a lot of trouble getting the game to set a unique value to player 2 when I was testing. Not to mention my game requires the ragdoll to be destroyed and re-created occasionally which would result in it getting a new ID and breaking the code I used.

    I also have objects attached to the ragdoll such as a crosshair which would need to be created and used every time.

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