nathan
New Member
Posts: 5
Posts: 5
|
Post by nathan on Apr 21, 2019 9:16:40 GMT
Hello! Great asset.
Does there happen to be a way to sync the footstep component with animation events? I'm trying to get the timing right between walking and running, and previously, that's how I handled it.
Thanks!!
|
|
|
Post by DarkTonic Dev on Apr 21, 2019 16:16:59 GMT
If you do anything with animation, footsteps scripts will not be used. That script triggers off collider triggers only.
|
|
nathan
New Member
Posts: 5
Posts: 5
|
Post by nathan on Apr 21, 2019 19:29:06 GMT
Ah, OK. Thanks.
Previously, I was using an animation event to fire off a custom method that would play a random footstep based on ground tag (grass, concrete, etc.) The footstep component handles most of that, just not the timing. How does that currently work? Is it just a set delay between each step?
Would you recommend I just stick to the function that I've already written, or is that something you think I could recreate with "Event Sounds?"
|
|
|
Post by DarkTonic Dev on Apr 21, 2019 19:38:32 GMT
The delay in that script is set with a Retrigger Limit, where you set the minimum time that must elapse before another sound will be played, regardless of how many times the collider was triggered. Each time it's triggered, it checks if the min time is elapsed or not.
Event Sounds won't help you with a per tag scenario at all, so probably just stick with your code. The only thing you could do with Event Sounds is: set up a bunch of Custom Events, one for each tag. Then fire off the appropriate Custom Event from your script, which will play the sound you specified for that Custom Event in EventSounds. Either way would work.
|
|
nathan
New Member
Posts: 5
Posts: 5
|
Post by nathan on Apr 21, 2019 19:57:10 GMT
OK, this helps a lot. Thank you!
|
|
|
Post by DarkTonic Dev on Apr 21, 2019 19:59:03 GMT
No problem.
|
|
nathan
New Member
Posts: 5
Posts: 5
|
Post by nathan on Apr 22, 2019 19:25:59 GMT
Just FYI, I ended up implementing your idea of using several custom events for each tag, and firing off the custom events from my script.
Not only did it help me identify a bug in my code, it also worked like a charm. Thank you!!
|
|
|
Post by DarkTonic Dev on Apr 22, 2019 20:39:33 GMT
Glad to be of help!
|
|