Platform behavior - only one object can have it?

0 favourites
  • 3 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • I used the plaformer template and cloned the player, then I am spawning the clone as enemies. However when I use the controls for the player, it affects the clone. For example the clone jumps when I make the player jump.

    Is the platforming behavior not specific to the object? Must be a pain for those wanting to make two player mario clones? I mean it's weird - I am using the template and the code refers to the player object and then to simulate moving on a keypress. Everything else works with a specific reference but here if you tell the player to jump it's sending that to another object with the platform behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You probably have default controls enabled on enemy object, disable them in Platform properties.

    Another possible explanation - if you have PlayerFamily and using it in events (for example "PlayerFamily simulate jump"), when you cloned your Player object, the cloned Enemy object was also added to the same family.

  • Ah, I see what happened. The platformer template actually has manual controls written in the code - but they are to support WASD use. I didn't realise the platformer template had it's own control code for regular keys.

    Okay, so I turned it off and you are right, it works now.

    Thanks dop2000, I overlooked that there would be something like this because I kept looking at the events sheet and how it was taking keyboard input and assumed that was the only way it worked.

    Thanks again :)

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