How to find the speed of an actor?
ericdg123
Member, PRO Posts: 156
I'm just not figuring this out. Where do I find the speed of an actor? I can find the x and y speed but how do I find out the total speed in any direction? What I'm trying to do is have a speed variable so I can use that to change the pitch of sounds based on the speed of an actor.
Thanks.
Thanks.
Comments
Few thoughts came to mind here (thinking out loud, as it were): if you want the pitch of the sound to change based on the speed of the Actor, then total speed isn't relevant. It'd be based on the variable speed (speed at any point using Acceleration), which would be different moment by moment. So, you'd need an integer attribute, called SpeedAtThisMoment perhaps, which would be updated regularly with a timer. (how you'd do that, I'm not sure yet; perhaps another Forum member can chime in there).
Then in your Rules somewhere, I guess you need Play Sound set to looped, the pitch set to SpeedAtThisMoment.
This might not be completely there, but it's in the the ballpark, as it were, I think; hope it gives you a few leads to solve it at least.
:-)
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
square root of (linearX^2 + linearY^2)