Cagealicous Posted December 1, 2018 Share Posted December 1, 2018 Now, what I am trying to do is change the character's voice when he is just talking. What I want to change the voice to when talking is "angry_LP," but I can't seem to get it to work. For Wolfgang, this is possible. Do I have to put something in modmain.lua for it to work? local function beangrycage(inst) if TheWorld.ismastersim then inst.isangrycage:set(true) inst.components.locomotor:SetExternalSpeedMultiplier(inst, "ethan_speed_mod", 1.25) inst.components.combat.damagemultiplier = 2 if TheNet:GetServerGameMode() == "lavaarena" then inst.components.health.absorb = -0.3 end if not inst:HasTag("playerghost") then inst.components.skinner:SetSkinMode("angry_skin", "ethan_angry") end end inst.talksoundoverride = "dontstarve/characters/ethan/angry_LP" Link to comment Share on other sites More sharing options...
Eusong Posted December 1, 2018 Share Posted December 1, 2018 RemapSoundEvent( "dontstarve/characters/ethan/talk_LP", "ethan/ethan/angry_LP" ) That would go in your modmain and would only change the talking sounds make sure in your assets you have Asset("SOUNDPACKAGE", "sound/ethan.fev") and Asset("SOUND", "sound/ethan.fsb") Link to comment Share on other sites More sharing options...
Cagealicous Posted December 1, 2018 Author Share Posted December 1, 2018 Alright, now how do I change it back to normal? It is still the voice when he goes back to neutral. local function beneutralcage(inst) if TheWorld.ismastersim then inst.isangrycage:set(false) inst.components.combat.damagemultiplier = 1 if TheNet:GetServerGameMode() == "lavaarena" then inst.components.health.absorb = 0 end inst:RemoveTag("insomniac") inst.talksoundoverride = "dontstarve/characters/ethan/talk_LP" if not inst:HasTag("playerghost") then inst.components.skinner:SetSkinMode("normal_skin", "ethan") end end Link to comment Share on other sites More sharing options...
Eusong Posted December 1, 2018 Share Posted December 1, 2018 Try something along the lines of (in modmain) GLOBAL.bewhatevercage = function(inst) (insert what you want it to do here) end and then inside the prefab call it as bewhatevercage(inst) See if that works? Link to comment Share on other sites More sharing options...
Cagealicous Posted December 1, 2018 Author Share Posted December 1, 2018 I don't think that would work, because all I'm trying to do is change my character's talking voice when he is angry, and then change it back to normal. I know they did it for Wolfgang when he either is Mighty or Wimpy. Link to comment Share on other sites More sharing options...
Eusong Posted December 1, 2018 Share Posted December 1, 2018 Oooh, sorry I'm tired. xD Do you have the sound assets in your player prefab? Link to comment Share on other sites More sharing options...
Cagealicous Posted December 1, 2018 Author Share Posted December 1, 2018 What would you mean? I'm sorry. I'm just a bit confused. That's all. Link to comment Share on other sites More sharing options...
Eusong Posted December 1, 2018 Share Posted December 1, 2018 local assets = { Asset("SCRIPT", "scripts/prefabs/player_common.lua"), Asset("ANIM", "anim/ethan.zip"), Asset("SOUND", "sound/ethan.fsb"), } If that doesn't work, try adding in Asset("SOUND", "sound/ethan.fev") as well Link to comment Share on other sites More sharing options...
Cagealicous Posted December 1, 2018 Author Share Posted December 1, 2018 That didn't work. What I am trying to do is this in modmain.lua: RemapSoundEvent( "dontstarve/characters/ethan/angry_LP","ethan/ethan/angry_LP") In ethan.lua: local function beangrycage(inst) if TheWorld.ismastersim then inst.isangrycage:set(true) inst.components.locomotor:SetExternalSpeedMultiplier(inst, "ethan_speed_mod", 1.25) inst.components.combat.damagemultiplier = 2 if TheNet:GetServerGameMode() == "lavaarena" then inst.components.health.absorb = -0.3 end if not inst:HasTag("playerghost") then inst.components.skinner:SetSkinMode("angry_skin", "ethan_angry") end end inst.talksoundoverride = "dontstarve/characters/ethan/angry_LP" Link to comment Share on other sites More sharing options...
Cagealicous Posted December 1, 2018 Author Share Posted December 1, 2018 Alright. I found my solution. I forgot to disable inst.soundname = "ethan". Once I disabled that, I got it to work. Thanks anyways. 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