Jump to content

Recommended Posts

Example on amulet.lua it is:
owner.AnimState:OverrideSymbol("swap_body", "torso_amulets", "redamulet")

and on hats.lua it is:
owner.AnimState:OverrideSymbol("swap_hat", "hat_miner", "swap_hat")
(for miner hat)

What are those 3 parameters? Where can I see this function definition?

Thanks.

All AnimState functions are defined in the engine side, and cannot be seen. But we can "guess" the parameters according to the names of variables that are passed as parameters, so we have:

AnimState:OverrideSymbol("target_symbol", "new_build", "new_symbol")

>> Override the symbol "target_symbol" with the symbol called "new_symbol" that is in the build bank "new_build".

 

The mining hat, as an example:

owner.AnimState:OverrideSymbol("swap_hat", "hat_miner", "swap_hat")

>> Override the "swap_hat" symbol in the character build with the "swap_hat" symbol of "hat_miner" build.

Edited by Leonidas IV

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