Jump to content

Recommended Posts

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"
	

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")

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
	

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?

 

 

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.

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

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"
	

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...