Jump to content

Can't change beefalo riding animation


Recommended Posts

 

Hello, can someone please help me to put my new animations on beefalo, in beefalo animations anim.bin and build.bin are in diferent zip folders what just make things harder to animate, i changed all the states animations of beefalo (walk, eat, atack, ...) but i can't change the run animation when is on ride. that's the animation when i mount 

but when i dismount the animation works normaly please help me fix that

here's the prefab document tut06.lua

local tendencies =
{
    DEFAULT =
    {
	--build= "car4",
    },

    ORNERY =
    {
        build = "carroso_build",
    },

    RIDER =
    {
        build = "carroso_personality_docile",
    },

    PUDGY =
    {
        build = "carroso_build",
        customactivatefn = function(inst)
            inst:AddComponent("sanityaura")
            inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY*1.3
        end,
        customdeactivatefn = function(inst)
            inst:RemoveComponent("sanityaura")
        end,
    },
}

-- This takes an anim state so that it can apply to itself, or to its rider
local function ApplyBuildOverrides(inst, animstate)
    local herd = inst.components.herdmember and inst.components.herdmember:GetHerd()
    local basebuild = (inst:HasTag("baby") and "beefalo_baby_build")
           -- or (inst.components.beard.bits == 0 and "beefalo_shaved_build")
            or (inst.components.domesticatable:IsDomesticated() and "carroso_build")
            or "carroso_build"
    if animstate ~= nil and animstate ~= inst.AnimState then
        animstate:AddOverrideBuild(basebuild)
    else
        animstate:SetBuild(basebuild)
    end

    if (herd and herd.components.mood and herd.components.mood:IsInMood())
        or (inst.components.mood and inst.components.mood:IsInMood()) then
        animstate:Show("HEAT")
    else
        animstate:Hide("HEAT")
    end

    if tendencies[inst.tendency].build ~= nil then
        animstate:AddOverrideBuild(tendencies[inst.tendency].build)
    elseif animstate == inst.AnimState then
        -- this presumes that all the face builds have the same symbols
        animstate:ClearOverrideBuild("carroso_personality_docile")
    end
end

local function ClearBuildOverrides(inst, animstate)
    if animstate ~= inst.AnimState then
        animstate:ClearOverrideBuild("carroso_build")
    end
    -- this presumes that all the face builds have the same symbols
    animstate:ClearOverrideBuild("carroso_personality_docile")
end
inst.AnimState:SetBank("car")
    inst.AnimState:SetBuild("carroso_build")
    inst.AnimState:PlayAnimation("walk_loop", true)
please help me put a diferent riding animation on my prefab

tut06_car.zip

 

Sem títuasdlo.png

 

 

 

image.thumb.png.bf6ef9432b7b3275820b168065b39d53.png

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...