need help with this simple problem

Get help using Construct 2

Post » Mon Jul 10, 2017 7:44 pm

hello, can anyone help me with this. I try to do the platform animation with attack, run and default(standing)
the problem is, whenever i land on the floor, I can move the character but cannot play the run animation. the attack animation is ok but the problem is just that, the movement.

I try to do this btw:
keyboard > on z released : sprite > set animation to "attack" (play from the beginning)
Sprite > platform on landed :
SUB EVENT Sprite > Platform is moving : Sprite > set animation to "run" (play from the beinning)
SUB EVENT Sprite > X Platform is moving : Sprite > set animation to "Default" (play from the beinning)

Just when I try to move my sprite. the animation won't trigger.

i'm quite beginner btw, I tried to learn from tutorial, but i prefer asking someone, since it is direct and simple. please excuse me for this.
B
7
S
2
Posts: 25
Reputation: 575

Post » Mon Jul 10, 2017 8:35 pm

I think you're looking for 'Is on floor' instead of 'On landed'. 'On landed' is when the player first hits the ground, so you can't run at the same time as this.
B
46
S
16
G
77
Posts: 2,161
Reputation: 45,837

Post » Mon Jul 10, 2017 8:37 pm

Platform > On Landed is a trigger condition, meaning its events only happen on the one frame that it is true. At the moment your code thinks you only want to see the run animation at the exact brief instant you land on the floor.
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 205
Reputation: 3,468

Post » Mon Jul 10, 2017 8:48 pm

I try to that but instead the attack animation wont trigger by released the z button, but as for running, yes it trigger.
B
7
S
2
Posts: 25
Reputation: 575

Post » Mon Jul 10, 2017 8:54 pm

Because the two scenarios when you are releasing the Z button are already covered by animations : moving and not moving. You'll have to put a timer in or something when releasing the Z button to allow the attack animation to finish before playing the other anims.
B
46
S
16
G
77
Posts: 2,161
Reputation: 45,837

Post » Mon Jul 10, 2017 9:19 pm

well, i get the idea, in this case i try to include to

GROUP
Sprite > platform on floor :
SUB EVENT Sprite > Platform is moving : Sprite > set animation to "run" (play from the beinning)
SUB EVENT Sprite > X Platform is moving : Sprite > set animation to "Default" (play from the beinning)

when platform speed is not equal to 0 : set group activated
when platform speed is equal to 0 : set group deactivated.

somehow it work.
but, is this ok? and I would like to know if there is other method for this. If so, i want some example of it.
B
7
S
2
Posts: 25
Reputation: 575

Post » Mon Jul 10, 2017 10:51 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jul 10, 2017 11:33 pm

oh great! nice! :mrgreen:
I think that's all for me. thank you to all you.. really..
B
7
S
2
Posts: 25
Reputation: 575


Return to How do I....?

Who is online

Users browsing this forum: AllanR, brunopalermo, mOOnpunk, ST314, TheRealDannyyy, tunepunk and 22 guests