Jump to content

Custom wally introduction


Recommended Posts

I've been trying to modify a custom introduction for my mod that changes wally's intro speech but when its finished wally still stays there. The code is very similar to the custom maxwell speech I used in my previous mod so I'm not sure what I'm missing to make wally leave. I also got the code from the actual lua file itself and it looks really similar to the maxwell intro. Can someone help me find what I'm missing and hopefully I don't need to include the wallyintro.lua into the prefabs as it'll ruin compatibility with reign of giants. Also I did try reloading it, that doesn't make him leave.

Code that goes into the modmain:

local function ModWallyIntro(inst)
 if GLOBAL.GetPlayer().prefab == "duty" or GLOBAL.GetPlayer().prefab == "dutyseva" or GLOBAL.GetPlayer().prefab == "dutyskat" or
    GLOBAL.GetPlayer().prefab == "freedom" or GLOBAL.GetPlayer().prefab == "freedomseva" or GLOBAL.GetPlayer().prefab == "clearsky" or GLOBAL.GetPlayer().prefab == "loner" or GLOBAL.GetPlayer().prefab == "lonerseva" or GLOBAL.GetPlayer().prefab == "militaryskat" or
    GLOBAL.GetPlayer().prefab == "bandit" or GLOBAL.GetPlayer().prefab == "monolith" or GLOBAL.GetPlayer().prefab == "monolithseva"
    then ---pretty much check if its one the modded character
     inst.components.maxwelltalker.speeches.SHIPWRECKED_1 =
    {
        voice = "dontstarve_DLC002/creatures/parrot/chirp",
        idleanim= "idle",
        dialoganim="speak",
        disappearanim = TakeOff,
        disableplayer = true,
        skippable = true,
        {
            string = nil,
            wait = 1,
            anim = "idle",
            pushanim = true,
            sound = nil,
        },
        {
            string = "Opa!",
            wait = 1,
            anim = nil,
            sound = nil,
        },
        {
            string = nil,
            wait = 3,
            anim = "idle_peck",
            pushanim = true,
            sectionfn = function(inst)
                inst:ListenForEvent("animover", PlayPecks)
            end,
        },
        {
            string = "Good hunting stalker.",
            wait = 2,
            anim = nil,
            sound = nil,
        },
    
    }
end
end
AddPrefabPostInit("wallyintro", ModWallyIntro)

20170430183142_1.jpg

20170430183157_1.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...