Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: PET on September 26, 2016, 06:38:51 AM

Title: Footsteps Sound
Post by: PET on September 26, 2016, 06:38:51 AM
Hey there boys!

I need your help with something.

I'm moving the Camera (player) on a spline path.
I pause the Player on particular Nodes using my spline path system.
I resume the Player using Playmaker.

I'm trying to create a footstep system. Basically you move and every 0.6 seconds I do a check to see if you supposed to play the "Exterior Footstep Sounds" or some other footstep sound.

I use "Play Random Sound No Repeat" and I have about 4 independent footstep sounds for each category.

My main problem right now is finding when the player STOPPED so I don't play any sound. Considering that my Path System is not communicating with PlayMaker I need to find a way in PlayMaker to check if the player has stopped.

Any idea how to do this?

(http://puu.sh/rojgw/8b74cccb6f.png)

This is how my system looks right now. On "Check Footsteps Sound" I basically check a STRING. If String = Exterior ... I play the exterior footsteps sound.

I can change that string trough triggers so this is not a main problem. I could in a way put a trigger right before I stop... and say "no sound" ... but I'm trying to find a more elegant way.

Thank You Bros!
Title: Re: Footsteps Sound
Post by: terri on September 26, 2016, 06:51:12 AM
maybe you could get the position every time you play the sound, and if there isn't a significant difference from current to last that means you aren't moving
Title: Re: Footsteps Sound
Post by: PET on September 26, 2016, 06:57:54 AM
that's what I'm heading towards.

(http://puu.sh/rojSS/3973cedb2e.png)

I'm getting the player position every frame and I'm thinking on doing a compare.

Any other suggestions?