I am trying something new. I am trying to get the speed to change according to the velocity but I just cant get it to work. Can anyone help me out with this?
global vel as float
global avel as float
do
Velocity_Sound()
sync
loop
function Velocity_Sound()
velx as float : velx = phy get rigid body linear velocity x (2)
vely as float : vely = phy get rigid body linear velocity y (2)
velz as float : velz = phy get rigid body linear velocity z (2)
vel = sqrt((velx * velx) + (vely * vely) + (velz * velz))
set sound speed 1,18000+(vel*975)
' Sound Moving Forward
if vel() = 15 then set sound volume 1,0 : Play sound 5 : set sound volume 2,100 : set sound speed 2,18000+(vel*975)
if vel() = 20 then set sound volume 2,0 : pLAY SOUND 5 : set sound volume 3,100 : set sound speed 3,18000+(vel*900)
if vel() = 25 then set sound volume 3,0 : Play Sound 5 : set sound volume 4,100 : set sound speed 4,18000+(vel*850)
endfunction