How do I prevent my input from effecting enemy movement?

0 favourites
  • 6 posts
From the Asset Store
Give Sound to the enemies that are part of your game! :)
  • All in all, my test level is working pretty well. I followed along with the platformer tutorial here and used my own spritesheets and played with a few additional things.

    Here is my problem. I have my enemy moving around by using the 8Direction behavior for input and the Platform behavior to act like a... platformer enemy

    When my 'BunnyEnemy' is moving left and I press right to move right, my enemy stops moving as if my input is voiding out it's input while I have the opposite direction pressed.

    If I don't touch anything, the enemy walks left and right, detects edges and works as expected. As soon as I start moving in the opposite direction of my enemy, the input gets conflicted. When I release the input, the enemy just picks up and keeps moving as programmed.

    It is a minor bug but it is really irritating me and preventing me from wanting to proceed.

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • check if your enemies have the "default controls" activated, they may be reacting to your keyboard input, set defaults controls to no for everything that you dont want to move with your inputs.

  • Perfect! You solved it for me. It seems so obvious now. I had Platform Default Control set to No but 8direction Control set to Yes.

    Thank you so much. I knew I'd love this community.

  • Now I need to know how to change the jump key from Up Arrow to Z

  • On z pressed - simulate control "jump"

    In events use the keyboard object and choose "on key pressed" event and select "z"

    Then in the action section choose your object with the platform behaviour and there you'll find the simulate control action and just set it to jump.

    But simple stuff like this is easily found on the forum if you search

  • Now I need to know how to change the jump key from Up Arrow to Z

    if you want to remap the entire keys you use for moving your character, set default controls to NO and add the Keyboard plugin to your project, once is added go to your event sheet and you will need to create the event:

    keyboard | on key pressed = player| simulate control JUMP

    once you had set the "default controls" to no, you will have to entirely remap all your keys.

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