Platformer Game : Help for Behavior

Get help using Construct 2

Post » Tue Sep 25, 2012 11:06 am

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

B
3
Posts: 2
Reputation: 379

Post » Tue Sep 25, 2012 1:56 pm

[code]
+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
[/code]

Something like that...ramones2012-09-27 18:04:17
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Thu Sep 27, 2012 8:46 am

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
B
3
Posts: 2
Reputation: 379

Post » Thu Sep 27, 2012 6:02 pm

Oops, edited above. I forgot to set the animation back to walk when bounce is finished.
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Mon Nov 26, 2012 8:43 pm

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!
B
14
S
2
G
1
Posts: 10
Reputation: 1,750


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests