Jump to content

Adding a new slot for AnimState?


Polariche

Recommended Posts

When you make an equipable item, you are required to write something like this on prefab file:

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

We have 'slots' for attaching things to the player model, such as 'swap_object' for handheld objects, 'swap_body' for cloths and armors, and... 'beard' for the well... beard, obviously.

 

But where are these slots coming from? I've looked everywhere including anims and scripts. I even compiled .bin and .tex files into scml to check if they are there. No luck.

 

 

 

 

 

Link to comment
Share on other sites

 

Subdirectory name of your image file(s) = symbol name that will be assigned to them (counting from where your scml file resides, that is)

 

That means you can/have to make a dummy placeholder image (it can be whatever, 1x1 transparent image), put it into the subdir of your spriter project that corresponds to the symbol name you wish to use, then drag it into the scene where you want it to show. You can use multiple ones, do image swapping animation whatever as if they were normal objects. Finally, when you do overridesymbol in code, with the actual build/image, it's almost the same as if you were to copy paste the directory from override build into your spriter build (almost because the symbol names can differ, so can file names and they would still match on frame to frame basis, and there are certain cases - e.g. simply having BUILD anim name that seem to be making it ignore filenames - that I don't get for the life of me)

 

 

Uh oh. That doesn't sound good considering player model has TONS of animations... 

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