Jump to content

Recommended Posts

I am making an oar, it's fully functional besides the fact that that swap_anim is invisible! The prefab itself is called "living_oar" (its an oar made out of a living log), the "atlas-0.tex" in the swap anim folder isnt invisible and build.bin is renamed to swap_living_oar (from the normal oar).

I have tried the following:

  • Putting the anim and swap anim in the modmain like this (nothing happened)
Spoiler

Assets = {
    Asset("IMAGE", "images/inventoryimages/living_oar.tex"),
    Asset("ATLAS", "images/inventoryimages/living_oar.xml"),
    Asset("ANIM", "anim/living_oar.zip"),
    Asset("SWAP_ANIM", "anim/swap_living_oar.zip"),
}

  • Changing the first spoiler to the second spoiler in living_oar.lua (nothing happened)
Spoiler

 

local function onequip(inst, equipper)
    equipper.AnimState:OverrideSymbol("swap_object", "swap_living_oar", "swap_living_oar")
    equipper.AnimState:Show("ARM_carry")
    equipper.AnimState:Hide("ARM_normal")
end

local function onunequip(inst, equipper)
    equipper.AnimState:Hide("ARM_carry")
    equipper.AnimState:Show("ARM_normal")
end

 

Spoiler

 

local function onequip(inst, owner)
    local skin_build = inst:GetSkinBuild()
    if skin_build ~= nil then
        owner:PushEvent("equipskinneditem", inst:GetSkinName())
        owner.AnimState:OverrideItemSkinSymbol("swap_object", skin_build, "swap_living_oar", inst.GUID, "swap_living_oar")
    else
        owner.AnimState:OverrideSymbol("swap_object", "swap_living_oar", "swap_living_oar")
    end
    owner.AnimState:Show("ARM_carry")
    owner.AnimState:Hide("ARM_normal")
end

local function onunequip(inst, owner)
    owner.AnimState:Hide("ARM_carry")
    owner.AnimState:Show("ARM_normal")
    local skin_build = inst:GetSkinBuild()
    if skin_build ~= nil then
        owner:PushEvent("unequipskinneditem", inst:GetSkinName())
    end
end

 

  • Changing said "swap_anim" in the directly above spoilered code (tested with the oar, spear, and moon cutter. Changed the living oar to look like the respectable item)

Due to the circumstances and evidence, I believe that "swap_living_oar.zip" is not properly imported into living_oar.lua. I have optimized my mod as to only include the item if any of you would like to help me please.

 

living_oar mod.zip

Link to comment
https://forums.kleientertainment.com/forums/topic/118299-anim-problem/
Share on other sites

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