Walking/Running/Sprinting Sound Effects

Basically said above, how could one use python so that when shift+w are held it plays footstep noise every second, when just w is held it is twice as fast and when ctrl+w are held it plays three times as fast? Is this even possible? As far as I can tell it isn’t possible with logic bricks but if so please let me know. Or otherwise how to code it. Thanks in advance!

yes, rather than activate the actuator on the player, add empty , the empty can do the sound.

increase the frequency to add empty when run

PS: not forget to put the time of self-destruction when add the empty , 60 tick = 1 second more or less ,in this case should be sufficient

What do you mean, when those certain keys are held it adds an empty that emits the sound at a greater or lesser speed?

i say, when the character “walk” add empty each 15 tick, for example.(the empty has the actuator sound…it play the sound)
when “run” add that emty each 10 tick.
(the frequency should be a property that you manage in some way, or a timer)
you can also manipulate the “speed of the sound” changing the attribute “pitch” (in the sound actuator).
to change it dynamically you need of python.this can be useful just to manage a sound that loop continuely (as for example the wind, or the noise of a engine)


#supposing the actuator already run..
act = cont.actuator["Sound"] 
act.pitch = own["speedOfSound"]  ### this value should be between -10.0/+10.0