Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » jumping sounds
- Landslot1
- Scratcher
3 posts
jumping sounds
Link to my project https://scratch.mit.edu/projects/103791044/#player
I am having trouble getting a jump sound to play properly. When Y velocity = jump height (when you jump it plays the sound), the problem is, on the second level we have ceiling cling (which allows you to hold on to the ceiling and then jump upwards after it if you hold up arrow key) it will continuesly play the jump sound. Can someone help me code it to only play when you jump off the ceiling aswell as when you jump normally?
I am having trouble getting a jump sound to play properly. When Y velocity = jump height (when you jump it plays the sound), the problem is, on the second level we have ceiling cling (which allows you to hold on to the ceiling and then jump upwards after it if you hold up arrow key) it will continuesly play the jump sound. Can someone help me code it to only play when you jump off the ceiling aswell as when you jump normally?
- epicr45
- Scratcher
11 posts
jumping sounds
have a separate script play jump sounds.
something like this
something like this
when [up arrow v] key pressed
play sound [jump v]
wait until <not <key [up arrow v] pressed?>>
“A computer once beat me at chess, but it was no match for me at kickboxing”
-Emo Phillips
- Landslot1
- Scratcher
3 posts
jumping sounds
No that will not work cause if you hold down the up arrow it will continue to jump, your script tells it to wait until you stop holding it.
- Carpit999
- Scratcher
100+ posts
jumping sounds
On the end of your jumper block, add this at the end of it:
wait until <not <key [up arrow v] pressed?>>
((((((((([O*O v]::motion ring)::looks ring)::pen ring)::list ring)::control ring)::sensing ring)::operators ring)::grey ring)::extension)// This is Starry. He likes Carrots and Java. He protects my siggy from evil kumquats.Your stuff My account Your messages If I helped you, tell me Here.
- OZKORAPPA500
- New Scratcher
1 post
jumping sounds
I know this is a super late reply, but maybe you can do as i did:
when w key is pressed
if y position = (the ground y axis) then
play sound jump until done
when w key is pressed
if y position = (the ground y axis) then
play sound jump until done
- 56108362
- Scratcher
2 posts
jumping sounds
just say this
when key pressed
play sound
wait until <>
touching ?
when key pressed
play sound
wait until <>
touching ?
- cosmosaura
- Scratch Team
1000+ posts
jumping sounds
This topic is closed to prevent necroposting.
___________________
Scratch Team Member
Love hiking, cycling and travelling.
- Discussion Forums
- » Help with Scripts
- » jumping sounds