Jump to content

Change appearance of equipped item based on temperature


Recommended Posts

I'm working on an item that combines features of a weapon and a thermal stone.  Like a thermal stone, it changes color depending on its temperature.  I have this working for the inventory image and "ground" animation, but not for the "swap" animation that appears in the character's hand when it's equipped.  Does anyone know how to replace the swap animation on the fly?

 

Thanks in advance for your help!

Link to comment
Share on other sites

Use this line again:

owner.AnimState:OverrideSymbol("swap_object", "swap_blowdart", "swap_blowdart")

 

I took the blowdart as example. If you have issues with displaying your swap symbols, try the blowdart types instead.

 

Thanks very much for your quick reply!

 

This leads me to my next question: I've never seen reliable documentation for the the arguments to OverrideSymbol and how they relate to Spriter animations. 

 

For instance, suppose I create a Spriter project called "swap_myitem.scml" in a folder with a subdirectory called "my_subdirectory" which contains the images.  The Spriter animation contains an entity called "my_entity" with an animation called "BUILD".  Then the call to OverrideSymbol would look like:

 

OverrideSymbol( "swap_object", "swap_myitem", "my_subdirectory" )

 

Is that correct?

Link to comment
Share on other sites

Got it working: I created multiple spriter projects called "swap_item1.scml", "swap_item2.scml", etc. and used OverrideSymbol to swap them in.  For the sake of neatness, I tried creating multiple entities in a single spriter project with the same naming pattern, but that didn't work.

 

So, to supply a partial answer to my own question, if you create a spriter project "swap_item1.scml" with an entity "swap_item1" and an animation called "BUILD", and put the image in a subdirectory called "swap_item", then the call to OverrideSymbol looks like:

 

OverrideSymbol( "swap_object", "swap_item1", "swap_item" )

 

Link to comment
Share on other sites

On 8/10/2015 at 11:15 AM, keraunoscopia said:

Got it working: I created multiple spriter projects called "swap_item1.scml", "swap_item2.scml", etc. and used OverrideSymbol to swap them in.  For the sake of neatness, I tried creating multiple entities in a single spriter project with the same naming pattern, but that didn't work.

 

So, to supply a partial answer to my own question, if you create a spriter project "swap_item1.scml" with an entity "swap_item1" and an animation called "BUILD", and put the image in a subdirectory called "swap_item", then the call to OverrideSymbol looks like:

 

OverrideSymbol( "swap_object", "swap_item1", "swap_item" )

 

Hey, I'm working on solving this issue with my mod, but am a little confused as to where to put the files exactly. I think I just need to see an example of this so I have something to go off of.

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