I want to make a subtle non annoying sample play when the player hits the ground after coming down from a jump.
(Player has a jumping and falling animation, single frame animation for both)
I've tried the following:
'Falling' Animation is playing
'Player' collides with backdrop
PLAY 'HIT' SAMPLE
nothing happens,
I've tried just leaving the 'Player' collides with backdrop and it works perfectly, BUT of course as the player just walks on the ground the sample will play randomly.
I only want it to play the sample as soon as the player hits the ground from a jump. Just like in the Mega Man games.
Is the falling anim looped, or does it just play a single frame? It might help to change it into a looped anim.
Once you've figured that out, you might want to make a detector for the 'Player' feet - at this current stage, the sound will play when you collide when falling into 'any' backdrop - so if you were falling against a wall the sound would continually play. Putting a detector in the feet would make sure only when the feet touch a backdrop the sound will play.
I got it working another complicated way but I'll set it to looped animation.
This is how i got it to work:
I added a 'Jump' Counter
When either animation 'JUMP' or 'FALLING' is over I set the counter to 1
When the player lands on the backdrop it sets the counter to 0
if JUMP counter = 0 then no sound will play when player is walking on ground
if JUMP counter = 1 and player hits ground then the sample plays
if anyone wants to check it out, I have a game I'm working on called 'Project Nintendo'
Strangely I KNOW i updated the demo to reflect the mega man jumping sample + some other random things, but it wasn't updating on my ftp. The link is fixed now but its nothing major.
I'd do it - When player is jumping (however it's calculated) set some value to something. Player is on the ground + value is something; set value to 0 and play sound.
can be done way easier. Make a group with an event that has: If character collides with background then: deactivate this groupa and play a sample. Activate the group when you push the jump button.