A Pufferfish Posted May 29, 2025 Share Posted May 29, 2025 (edited) I'm currently working on a Wagstaff mod for DST and I've hit a snag related to his voice changing based on his health. I'll try to provide as many details as possible. Currently, his talk_LP file work s correctly, I'll attach videos / the code used to make it work. local function SGWilsonPostInit(sg) local oldtalk = sg.states["talk"].onenter sg.states["talk"].onenter = function(inst, noanim) oldtalk(inst) if inst:HasTag("hasvoiceintensity_health") then local percent = inst.components.health:GetPercent() inst.SoundEmitter:SetParameter("talk", "intensity", percent) end end end AddStategraphPostInit("wilson", SGWilsonPostInit) Here's the code, to run through it simply, Wagstaff has the 'hasvoiceintensity_health' tag, It checks the percent he has of his max HP, which it then increases/decreases the intensity based on that value, which is a parameter the sounds have. Lower health means less intensity. Here's a video example of it in-game, and in FMOD. talk_LP.mp4 talk_LPFmod.mp4 This, works as intended completely. Now onto the problem. When doing an emote, it doesn't effect the intensity variable at all. Here's the code that I've been testing to have it work. local function SGWilsonPostInit(sg, data) local oldemote = sg.states["emote"].onenter sg.states["emote"].onenter = function(inst, data) oldemote(inst, data) if inst:HasTag("hasvoiceintensity_health") then local percent = inst.components.health:GetPercent() inst.SoundEmitter:SetParameter("emote", "intensity", percent) end end end AddStategraphPostInit("wilson", SGWilsonPostInit) In-game and in FMOD; Emote.mp4 emoteFmod.mp4 Any assistance is appreciated Edited May 29, 2025 by A Pufferfish Had too much empty space at bottom Link to comment https://forums.kleientertainment.com/forums/topic/166014-requesting-help-regarding-making-emotes-activate-fmod-parameters/ 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