Ennemy pattern movements issue

0 favourites
  • 6 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • [Hello everyone! I created a movement pattern for my sprite ennemy (move-stop-jump) and when this ennemy is hit by a bullet I would like it to stop and start again his loop movement. I've been able to make it stop but not to make it restart his movements from the beginning. It still continues until his loop is finished. Any ideas how I could figure this out? Thank you very much!
  • What matter is that the enemy could be able to get into certain state based on condition or input it encounters. Make sure all condition met when the enemy should back to initial state or in-between state.

    Do not hesitate to share portion of your project here for direct elaboration.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you kindly for your answer!

    Attached here the events, as you can see the pattern movement has been made with variables.

    So when the bullet touch the sprite it does stop, but instead of going back to the loop it continues until it is finished.

  • There should be better logic for clarity. I suspect a 'wait' action keep triggering back from top but never really finish to pass the wait while the condition still in collision state. Try to remove or disable it and observe the result.

  • Hello Alextro.

    I tried remove the wait actions and there is no more actions going on but the sprite is still moving of course.

    I think that you are right saying that the 'wait' actions keep triggering back.

    But what should I do if want my movement pattern to include "times" (for instance: action wait 2s then action 2)?

    Using the timer behavior?

    I think I should you use a boolean somewhere but I really do not know how to do it in that case.

  • Use timer if you like to or incorporating variable is good option too. For example if you have variable named 'counter' so you can counting from 0 to 50. After the variable reach 50 you can set desired action to occur.

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