Is there some kind of For(x seconds) function?

Just started using Construct 2? Post your questions here

Post » Fri Jan 23, 2015 5:43 pm

I have a simple animation trigger that goes something like this:

When Player Platformer is falling -> Play Jump animation at frame 1
-When Input pressed -> Play Jump animation at frame 2

(A setup for playing a certain frame for jumping while in the air)

However since the mid-air firing animation plays when the input is pressed, it only shows the firing animation as the button is pressed. Since it's a sub-event of the player falling it just goes back to the falling animation after a milisecond of the button being pressed. As you can imagine this is not my desired effect.

I want the mid-air animation to play when the player is in the air and fires the firing button, but for about a second for every time the firing key is pressed. I figured I could get this done with triggering a Boolean value and have that Boolean value make itself false after a wait command, but I feel like an easier workaround probably exists.
B
20
S
5
Posts: 108
Reputation: 1,473

Post » Sat Jan 24, 2015 6:17 am

Can you post a capx?
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Sat Jan 24, 2015 8:25 am

Have you try "Trigger Once While True" yet ?
or maybe you can add "Animation Frame 2 is not playing" to the "When Player Platformer is falling"

and as @TheDom said it would be easier to help if you post with capx file.
B
12
S
1
Posts: 84
Reputation: 1,487

Post » Sat Jan 24, 2015 9:04 am

Can't help thinking the Timer behaviour might come in handy there
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Jan 25, 2015 8:03 pm

newlee wrote:Have you try "Trigger Once While True" yet ?
or maybe you can add "Animation Frame 2 is not playing" to the "When Player Platformer is falling"

and as @TheDom said it would be easier to help if you post with capx file.


I think this + another solution that I found out is making it work. I'm going to run some additional tests and post the results later. Thanks!

I don't think the Timer will work but I'll try to see if that helps too.
B
20
S
5
Posts: 108
Reputation: 1,473

Post » Mon Jan 26, 2015 5:14 am

@General J
Good luck man, I'm wating to see the game that you are working on.
B
12
S
1
Posts: 84
Reputation: 1,487


Return to Beginner's Questions

Who is online

Users browsing this forum: brunopalermo and 0 guests