Platformer Game : Help for Behavior

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello,

    i try to make a 2D platformer Game with construct2, i really a noob on the events system, i read some tutorial, but i don't found my answer, if a person here can help me it's will be great,

    I started the behavior of my first enemy with the tutorial "How to make a Platform game"

    My enemy is similar at the snail with some features,

    actually he can turn correctly when he collide with the box, but i would like make some changement,

    i would like, my enemy

    1) stop to move when he collide with the box

    2) change the animation walk by a animation "bounce" when he collide with the box

    3) set mirrored right to left

    4) change the animation "bounce" by walk

    5) restart the move

    thank for your answers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • +snail: on collision with box
       -> snail: set animation to "bounce"
    
    +snail: on animation "bounce" finished
       -> snail: set animation to "walk"
       +snail: action = "right"
          -> snail: set action = "left"
       +else
          -> snail: set action = "right"
        
    +snail: Is animation "walk" playing
       +snail: action = "right"
          -> snail: simulate pressing right
          -> snail: set not mirrored
       +snail: action = "left"
          -> snail: simulate pressing left
          -> snail: set mirrored
    

    Something like that...

  • Hello ramones and thank you for your help,

    I just tested your logic,

    so effectively when the bounce animation is not playing, the simulate control works fine, but after collide and play the bounce animation,

    the simulate control doesn't restart

    Have you an idea ?

    thanks

  • Oops, edited above. I forgot to set the animation back to walk when bounce is finished.

  • Hello!, I have the same problem with the platform game tutorial.. Can you provide a capx example... It's doesn't work for me..

    Thanks!

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