Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Car Sound (Hard Question)

Author
Message
xxdemzxx
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: CA
Posted: 28th Oct 2005 04:43 Edited at: 29th Oct 2005 01:04
Status: NOT SOLVED

How can I make an engine sound that gets louder when you speed up and clams down when your slowing down then goes to an idle when the car stops?

Is it even possible?

This is my movement code right now:
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 28th Oct 2005 04:53
Well there is a set sound volume and a set sound speed command.

Loop a constant noise and multiply the speed# by something like 10(whatever you find makes the best noise) Then in the loop put a set sound speed and volume to speed#*10

If the speed is zero you just have an if statement that sets the speed of the sound when speed is zero.

xxdemzxx
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: CA
Posted: 28th Oct 2005 05:12 Edited at: 28th Oct 2005 06:48
Dont work... Ill keep on trying.
Edit:

It says Sound Frequency Value Illegal. Im using,


Am I doing something wrong?
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 28th Oct 2005 07:09
xxdemzxx,

The frequency has to be an integer(whole number), and not a real number(any number with a value to the right of the decimal), which will be the majority of what you get out of your code above. Therefore, use the int() command to return an integer value of a rounded real number.





+NanoBrain+
xxdemzxx
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: CA
Posted: 28th Oct 2005 07:10
Oh!, thanks I get it now.
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 28th Oct 2005 07:11
xxdemzxx,

Good to hear!



+NanoBrain+
xxdemzxx
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: CA
Posted: 29th Oct 2005 01:03
Nope nvm it still says Sound Frequency Value Illegal
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 29th Oct 2005 01:35
The sound frequency has to be between 1 and 200. If it exceeds or goes below that range it will give you that error.

What I suggest you do is make a variable called soundspd and give it the formula you used earlier.

After that make a check to make sure it doesn't go out of the range.

Like this:


xxdemzxx
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: CA
Posted: 29th Oct 2005 02:18
Quote: "The sound frequency has to be between 1 and 200. If it exceeds or goes below that range it will give you that error.

What I suggest you do is make a variable called soundspd and give it the formula you used earlier.

After that make a check to make sure it doesn't go out of the range.

Like this:

"





Nope still says Sound Frequency Value Illegal
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 29th Oct 2005 02:59
Maybe with sound the highest it can go is 100. Try that. I know that music can go to 200 though.

xxdemzxx
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: CA
Posted: 29th Oct 2005 03:20
Nope still says Sound Frequency Value Illegal.

Heres from the manual:
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 29th Oct 2005 03:53
then set your lowest to 100 and your highest to 100000

NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 29th Oct 2005 07:39
xxdemzxx,

Keep the int() onto your code, because either way, you will get an illegal value without it. Elsewise, unless the value is going below 100 or above 100,000, I am not sure, at the moment, what might be the problem.



+NanoBrain+

Login to post a reply

Server time is: 2024-09-24 07:25:02
Your offset time is: 2024-09-24 07:25:02