Well, you're not doing anything with the impulse values! I just looked at the AS3 docs; Looks like you have to create a SoundTransform object (which you can set volume on) and pass that as the third parameter to play().
How do i detect speed?
WCKI know i have to do something with the impulse values but i've no idea where to start, or what i need to do with them. My AS3 knowledge isn't that much past gotoAndStop kind of things. Normally i can get by with using other peoples code and modifying it.
I've searched for AGES on Google and these forums for someone else who has done something similar to what i want but surprisingly cant find anything. I dont get why it's so hard to do something that seems pretty simple, but if you dont even know how to Mayo then i've got no chance!
I've searched for AGES on Google and these forums for someone else who has done something similar to what i want but surprisingly cant find anything. I dont get why it's so hard to do something that seems pretty simple, but if you dont even know how to Mayo then i've got no chance!
Just go right to the AS3 reference:
http://help.adobe.com/en_US/FlashPlatfo ... index.html
Look up the Sound & SoundTransform classes to the left.
http://help.adobe.com/en_US/FlashPlatfo ... index.html
Look up the Sound & SoundTransform classes to the left.
What should i do with the impulse values before i deal with the sound?
I finally found someone who wanted to do the same thing... viewtopic.php?f=8&t=4105&start=250
(top 4 posts)
But i'm not sure how to implement that using the BoxMan class. It needs to work when the player impacts with a wall (AS linkage is "Wall"), then play a sound depending on impact strength. SoundA for low impact, or SoundB for high impact strength. Or instead it could change the volume level of SoundA for each impact strength instead of using two separate sounds, whichever is easier.
I finally found someone who wanted to do the same thing... viewtopic.php?f=8&t=4105&start=250
(top 4 posts)
But i'm not sure how to implement that using the BoxMan class. It needs to work when the player impacts with a wall (AS linkage is "Wall"), then play a sound depending on impact strength. SoundA for low impact, or SoundB for high impact strength. Or instead it could change the volume level of SoundA for each impact strength instead of using two separate sounds, whichever is easier.
Original thread: https://box2d.org/forum/viewtopic.php?t=7162