movingness and stuff like?

Is there a way to figure out if an object is moving?
FOR EXAMPLE:
If the wheel is turning, play [this sound] on a loop

help?

dude why don’t you just put it in the logic bricks(haven’t fiddled with sound yet so dunno), like put the sound player under the same actuator?

I want to use physics for the wheels of a skateboard, so whenever they are turning (even in air) I want it to play a rolling sound.

ya but off the and thing you can add a sound thing with the physics…can’t you?

you could call a python scipt with an always and get global variable which are location of your object… And then compare the GameLogic.ObjectLocX (for exemple) with the old value …
and then, use AddActuator command to launch the sound

Nah, there’s a way to get velocity of an object. Now if I could just remember…

Aha.

 
speed = own.getVelocity()
 

if speed > 1:GameLogic.addActiveActuator(playsound,1)

else:GameLogic.addActiveActuator(playsound,0)

I think I forgot how to use addActiveActuator().
It could be: playsound.addActiveActuator(1) (where 1 is on and 0 is off)

Of course this gets linear velocity, but if the skateboard is moving it can assume the wheels are spinning…

it is really easy with logic bricks …

just do a collision sensor for your ground/sidewalk/street/ramp mesh connected to a seamless looping sound (use play or play stop)

when your skateboard is stopped, it will stop the collision, and stop the sound.
so basically it will only play the sound when he is on the ground, and moving like a real skateboard…

you can add nice dust effects or whatever else you want to happen when the sound plays, just connect to the same sensor…

hope that helps, it is one of the easyest things to do with logic bricks.