How do i check if double jumped (jumped mid air) and then start emmision of particles Once

How do I…

i am trying to make that if you jumped mid air a particle emits once

What is the expected result

i jump and nothing happens, then i jump again before hitting the ground and then particles get emitted and if i fall down somewhere and then jump mid air the particles should also emit.

What is the actual result

the furthest i got was that it emited particles once when jumped a second time and then emited it again until i hit the ground and when falling off a platform and then jumped mid air the particles didnt emit.

Hi could you post a screenshot of the events …I have done this before but I can’t remember how and I’m at work.
Are you using coyote time behaviour?

yes im using coyote time behaviour. so im using a behaviour for the double jump and i used a variable that went to 1 the first jump then to 2 when you released and then it added 1 as long as your jumping and if it is 3 then the particles get emitted

Without seeing how the events are it’s really difficult to say why it doesn’t work…have you tried using a text object linked to the variable to check that it’s going up as planned. You need careful use of either trigger once or conditions that means the variable is only counting up 1 each time and only doing it when you want it to

When you say particles…do you mean that it’s creating a particle emitter? Or individual objects?

sorry for late reply. it is a particle emitter that is at the same position as the player and starts/stops emitting

and this is the code right now.

I just did this - I got rid of coyote time as i tried ‘can jump again’ as a condition to raise the value of ‘jump’ and - nothing! so it went in the bin! and i just used allow to jump again!
darn made a mistake - change it to key pressed!

(upload://nCu1eu63U2TsH99gZtdStDBg0cD.png)
jumping1

but what if you fall down somewhere and then jump mid air?
how can i make that that also makes particles?

wait, ill show you how i would want it to look. then youll probably understand better what im trying to do.

1 Like

https://imgur.com/a/8zmPsdJ

I deleted my last one as that’s not right at all! off to watch a movie now - yes - post a pic

…can you post a short giff using screen to giff - i cant open that!
its getting more complicated see new events - i think they work now!..I’ll come back to this - got to go now!
looks great by the way

Animation

1 Like

Animation2

its almost exactly how i want it
Animation3


try this one - for some reason it didn’t work using ‘is falling’ and i had to save the y and check whether it was!

jumping2

why doesnt it work for me, what did i do diffrent?

it doesnt show any particles at all
and double jump only work once now

But ill be able to get it to work now.
thanks alot

The problem was that i didnt put the particle emitters on the player thats why it didnt show the particles

[edit]

i fixed it by adding this at the end of my last code

Have you got it how you want it now? - i like the graphics on the game btw
Sorry - I hadn’t realized that i’d missed an event off the screenshot - the ‘is on floor’ - set var ‘jump’ to 0 and delete sparks
i combined the on floor events and now its…

I looked at another project of mine ‘forty eight foe’ to see how id done it there - its a bit difficult to tell! as the events are all over the place. When you double jump in this game you grow wings! This works but looking back at it now, i couldn’t tell you how or why without spending a day going through it but here are to events for the key press in it …