Well-met Posted March 23, 2019 Share Posted March 23, 2019 Has anyone ever been able to assign footstep sounds to a custom character? The first entity that comes to mind with this feature is Deerclops so I've checked his stategraph local function DeerclopsFootstep(inst) inst.SoundEmitter:PlaySound("dontstarve/creatures/deerclops/step") ShakeAllCameras(CAMERASHAKE.VERTICAL, .5, .03, 1, inst, SHAKE_DIST) end CommonStates.AddWalkStates(states, { starttimeline = { TimeEvent(7 * FRAMES, DeerclopsFootstep), }, walktimeline = { TimeEvent(23 * FRAMES, DeerclopsFootstep), TimeEvent(42 * FRAMES, DeerclopsFootstep), }, endtimeline = { TimeEvent(5 * FRAMES, DeerclopsFootstep), }, }) However I believe the way this is implemented is the steps are manually referenced after a set amount of time or frame after a state. now the question is, is this workable for a basic player character since the anims / states are different? Link to comment Share on other sites More sharing options...
renetta96 Posted March 25, 2019 Share Posted March 25, 2019 I don't think anyone here knows The only way is you actually try it. I'm looking forward to your experiment result. Also maybe Wormwood code may have some hints ? He does spawn flowers as he walks :v Link to comment Share on other sites More sharing options...
ADM Posted March 26, 2019 Share Posted March 26, 2019 inst.foleysound = "dontstarve/creatures/deerclops/step" I guess this should works pretty fine Link to comment Share on other sites More sharing options...
Well-met Posted March 27, 2019 Author Share Posted March 27, 2019 13 hours ago, ADM said: inst.foleysound = "dontstarve/creatures/deerclops/step" I guess this should works pretty fine wow, that simple. Seems to be adding an extra layer ontop of default steps though. Any chance to disable the default sets? Link to comment Share on other sites More sharing options...
ADM Posted March 27, 2019 Share Posted March 27, 2019 7 hours ago, Hell-met said: wow, that simple. Seems to be adding an extra layer ontop of default steps though. Any chance to disable the default sets? Not sure about that but maybe you can process a loop of a killsound just like this inst.SoundEmitter:KillSound("character/character/step") Link to comment Share on other sites More sharing options...
Well-met Posted March 31, 2019 Author Share Posted March 31, 2019 Update on this it seems "inst.foleysound" is only clientside. Others can't hear the change How can I make it so everyone hears the new sound? Link to comment Share on other sites More sharing options...
Stormish Posted April 1, 2019 Share Posted April 1, 2019 17 hours ago, Hell-met said: Update on this it seems "inst.foleysound" is only clientside. Others can't hear the change How can I make it so everyone hears the new sound? Just put the foleysound code in your character's common_postinit or common_fn file and everyone should be able to hear it. Link to comment Share on other sites More sharing options...
Well-met Posted April 1, 2019 Author Share Posted April 1, 2019 29 minutes ago, Stormish said: Just put the foleysound code in your character's common_postinit or common_fn file and everyone should be able to hear it. Sounds like a good plan, however what if I want it to toggle on/off in real time for a perk? Link to comment Share on other sites More sharing options...
Stormish Posted April 1, 2019 Share Posted April 1, 2019 1 minute ago, Hell-met said: Sounds like a good plan, however what if I want it to toggle on/off in real time for a perk? Then you'll have to do some netcoding, which take some time and are kind of complicated to understand. Link to comment Share on other sites More sharing options...
Well-met Posted April 1, 2019 Author Share Posted April 1, 2019 3 minutes ago, Stormish said: Then you'll have to do some netcoding, which take some time and are kind of complicated to understand. Thanks, I suppose I'll figure something out before getting to that point. One last thing If I may, would you know if its possible to attach game effects to player footsteps? Such as losing 1 hunger each footstep and the likes. Link to comment Share on other sites More sharing options...
Stormish Posted April 1, 2019 Share Posted April 1, 2019 2 minutes ago, Hell-met said: Thanks, I suppose I'll figure something out before getting to that point. One last thing If I may, would you know if its possible to attach game effects to player footsteps? Such as losing 1 hunger each footstep and the likes. I don't know how it's done, but I know for sure that it can be possible. Link to comment Share on other sites More sharing options...
Well-met Posted April 1, 2019 Author Share Posted April 1, 2019 It would seem "Lag Compensation" is the culprit for predicting stock stepsounds to clients over the desired custom one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now