Jump to content

[solved]What does the parameters in function OverrideSymbol mean?


Recommended Posts

inst.AnimState:OverrideSymbol("symbol_name", "build_name", "symbol_name_2")

"symbol_name" is the name of a symbol of the build of inst you want to override.
"build_name" is the name of the build where you are going to pull the new symbol to do the override.
"symbol_name_2" is the name of the symbol of "build_name" that you are going to use to do the override.
 

Example:
owner.AnimState:OverrideSymbol("swap_body", "armor_wood", "swap_body")

You use the symbol "swap_body" from "armor_wood" build to replace symbol "swap_body" on the build of owner
(in this case, owner is a player, like Wilson; his build has a swap_body symbol)

 

Link to comment
Share on other sites

40 minutes ago, DarkXero said:

inst.AnimState:OverrideSymbol("symbol_name", "build_name", "symbol_name_2")

"symbol_name" is the name of a symbol of the build of inst you want to override.
"build_name" is the name of the build where you are going to pull the new symbol to do the override.
"symbol_name_2" is the name of the symbol of "build_name" that you are going to use to do the override.
 

Example:
owner.AnimState:OverrideSymbol("swap_body", "armor_wood", "swap_body")

You use the symbol "swap_body" from "armor_wood" build to replace symbol "swap_body" on the build of owner
(in this case, owner is a player, like Wilson; his build has a swap_body symbol)

 

so is it possible to swap with inventory item textures? since they dont have a build

Link to comment
Share on other sites

On 4/4/2016 at 3:46 AM, LongFeiaot said:

Is the symbol the name of a folder in exported?

Yes.

On 4/4/2016 at 3:46 AM, LongFeiaot said:

And to make the symbol_name_2 available, the animname in spriter must be "BUILD"or "BUILD_PLAYER"?

To make it available you just put the folder in the project. But doing this wouldn't do anything noticeable.

To make all animations use it though, that's a lot of work. Wouldn't recommend.

Link to comment
Share on other sites

@DarkXero 

I means that for a hat or handslot-equippable-item, I have to set anim name as BUILD or BUILD_PLAYER,otherwise I can't see it equiped.

Other things I understand ,thanks.

Edited by LongFeiaot
Link to comment
Share on other sites

2 hours ago, LongFeiaot said:

I means that for a hat or handslot-equippable-item, I have to set anim name as BUILD or BUILD_PLAYER,otherwise I can't see it equiped.

For the item animation, it can be anything you want.

For the swap_item, it has to be BUILD or BUILD_PLAYER.

 

Like stated here (code for DST prefab is different but the animation process is the same):

 

Link to comment
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
 Share

×
  • Create New...