So, basic morph setup: Ability feeds "Duration" to the actors, original unit has AbilMorph.Finish->Destroy event, new unit has AbilMorph.Finish->Create event to swap actors.
Both actors also have an ActorCreation->SetTintColor event to define the units' base color. Both have a custom label and making sure they're the same/different doesn't help.
Now, the problem is that the original tint color doesn't reset after the morph. With different labels the old tint simply stays as a separate channel. With equal labels or ClearTintColor events the resulting color is not the same as a unit preplaced in the editor. The morphed unit looks much brighter and less tinted, so my best guess is that the old tint channel isn't "cleared" but set to "white, HDR=1" and still coexists with the new tint.
What does work is setting a timer on Morph.Start, making sure it expires faster than the morph completes, and use the expire event to clear tint. This obviously has a short interval where the tint has been cleared but the old unit model is still being displayed (and for anyone trying to imitate: the timer must have expired 1/16 of a time unit before the morph finishes); it's also a pain to edit when adjusting morph times.
I had a similar problem with AnimGroupApply where the AnimGroupRemove wouldn't fire on AbilMorph.Finish (and neither does ClearTintColor, for that matter), but this was easily resolved by placing the AnimGroupRemove event on the new unit's actor. Trying the same with tint results in the "additional white channel" behavior. The order of the events in the list doesn't influence the outcome.
So, is there some trick I'm missing to kill the old tint? Cheap hacks like unticking the Properties+ flags are also out unless they don't interfere with model attachments and Simple type actors (phase shift, mass recall etc)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So, basic morph setup: Ability feeds "Duration" to the actors, original unit has AbilMorph.Finish->Destroy event, new unit has AbilMorph.Finish->Create event to swap actors.
Both actors also have an ActorCreation->SetTintColor event to define the units' base color. Both have a custom label and making sure they're the same/different doesn't help.
Now, the problem is that the original tint color doesn't reset after the morph. With different labels the old tint simply stays as a separate channel. With equal labels or ClearTintColor events the resulting color is not the same as a unit preplaced in the editor. The morphed unit looks much brighter and less tinted, so my best guess is that the old tint channel isn't "cleared" but set to "white, HDR=1" and still coexists with the new tint.
What does work is setting a timer on Morph.Start, making sure it expires faster than the morph completes, and use the expire event to clear tint. This obviously has a short interval where the tint has been cleared but the old unit model is still being displayed (and for anyone trying to imitate: the timer must have expired 1/16 of a time unit before the morph finishes); it's also a pain to edit when adjusting morph times.
I had a similar problem with AnimGroupApply where the AnimGroupRemove wouldn't fire on AbilMorph.Finish (and neither does ClearTintColor, for that matter), but this was easily resolved by placing the AnimGroupRemove event on the new unit's actor. Trying the same with tint results in the "additional white channel" behavior. The order of the events in the list doesn't influence the outcome.
So, is there some trick I'm missing to kill the old tint? Cheap hacks like unticking the Properties+ flags are also out unless they don't interfere with model attachments and Simple type actors (phase shift, mass recall etc)