0 Favourites

# How do I play roll sound when rolling, and bounce sound when

• 8 posts
• When the ball bounces (collides with a platform), it makes a bounce sound. But when the ball is rolling, I want it to play a continuous rolling sound that speeds up when the ball's speed increases and slows down when the ball's speed slows down.

How can I do this in Construct?

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• BALL > on collision with FLOOR> play sound BOUNCE

set bounce sound for not looping

sound plays on every bounce once

Of course you need to provide a lot more Info when posting a question of this type.

Are you using bullet behaviors, physics, animation when rolling? Is it on a flat surface or angle?

Give details.

Be descriptive.

Your post sounds like you didn't try anything yet.

http://www.neoprofessor.com

http://www.nakedgametalk.com

• BALL > on collision with FLOOR> play sound BOUNCE

set bounce sound for not looping

sound plays on every bounce once

Of course you need to provide a lot more Info when posting a question of this type.

Are you using bullet behaviors, physics, animation when rolling? Is it on a flat surface or angle?

Give details.

Be descriptive.

Your post sounds like you didn't try anything yet.

http://www.neoprofessor.com

http://www.nakedgametalk.com

Boy I am glad I kept looking threw these topics . Spending so much time on this problem myself and forced myself to ask for help.

I tried all kind of strange events. By the way, if I set collide with, I cant seem to add trigger once(true?) from system.

Here is a rough sketch what the problem is:

Surface behavior: physics

Ball Behavior: physics

Sound file is 0.5 sec long

• Ok. Try this

https://dl.dropboxusercontent.com/u/42168787/Rolling_Sound.capx

It's simple solution. I used global variable. I use 1 for true AND 0 for false.

if you object bounces a lot, give the system wait more time (0.5, 0.6, etc..)

If your going to use multiple Cogs (rolling balls), you'll need to use an Instance Variable within the cog and use Boolean operator instead.

If you think about it you can expand on this pretty easy.

• Ok. Try this

https://dl.dropboxusercontent.com/u/42168787/Rolling_Sound.capx

It's simple solution. I used global variable. I use 1 for true AND 0 for false.

if you object bounces a lot, give the system wait more time (0.5, 0.6, etc..)

If your going to use multiple Cogs (rolling balls), you'll need to use an Instance Variable within the cog and use Boolean operator instead.

If you think about it you can expand on this pretty easy.

I just discovered what the invert on right klick selection on condition is. That is condition False.

Thank you very much, it kind of helped! Also, I hope I am not that blind in the future not seeing some things are laid out almost right in front of me.

There are problems with your capx tough, first thing I did, I set the blue rectangle parallel with x axis and the cog will stay on the platform and your rolling sound is looping indefenetly. I added a speed smaller or equal mute condition to it, so It wouldnt loop on one place.

I will tinker around with your capx and see how I can implemenent it as nicely as possible. My new problem is my rolling character is moving lot faster on objects than on this capx and it it requires a lot more testing to get it right.

Thanks for making that capx!

• No problem. Actually, I can see the dilemma you were in. I'm sure there's a better solution that the one I presented,

it just hasn't come to me yet. I knew the use of the variables would help expand your thought process. I've found there is always a solution, you just need something to hit you on the head. Just something to remember; you can create variables that are strings, and use those to define states like falling, bouncing, rolling, etc. And write

SYSTEM>COG_VARIABLE = FALLING > PLAY FALLING_SOUND and so on.....

also you can use "trigger once while true" with collisions, you just have to make the "trigger once while true" a sub event of the "on collision" condition.

I think I might expand on that capx a little and post tutorial about it.

Anyway, good luck!

http://www.neoprofessor.com

http://www.nakedgametalk.com

• No problem. Actually, I can see the dilemma you were in. I'm sure there's a better solution that the one I presented,

it just hasn't come to me yet. I knew the use of the variables would help expand your thought process. I've found there is always a solution, you just need something to hit you on the head. Just something to remember; you can create variables that are strings, and use those to define states like falling, bouncing, rolling, etc. And write

SYSTEM>COG_VARIABLE = FALLING > PLAY FALLING_SOUND and so on.....

also you can use "trigger once while true" with collisions, you just have to make the "trigger once while true" a sub event of the "on collision" condition.

I think I might expand on that capx a little and post tutorial about it.

Anyway, good luck!

http://www.neoprofessor.com

http://www.nakedgametalk.com

I tried some variations, and I figured I will try to make it work like my sketch says (v=db). It will feel natural for faster rolling physical objects (tried it and failed right now). But it is more complex and I have some simplier matters to learn/attend to, like graphical resources for scenery, creating a custom fitting soundtrack for the game. There sheer amount of stuff you cand do, is overwhelming for a single project, but it is all managble, if you get what can-be-made-atm out of the way and then take your time to go threw the manual, examples and tutorials and nail those harder parts and learn them.

If you were to made a tutorial out of this, that would be awsome, but consider your own time first, because I think you have done more than enough right now!

• Thanks. I appreciate the sentiment. I may just post this capx with a short write up on the use of variables. Sounds like your on the right track and while some things get easier and faster as you go, you'll always being doing tedious things too. Good Luck and stay motivated...

• 8 posts