• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Problem with tinting colour when using metamorphosis

Status
Not open for further replies.
Level 5
Joined
May 20, 2008
Messages
138
Hi
I am creating a timed, uncancellable metamorphosis ability, that is to say, an ability that morphs a unit into another for a limited duration, and the morph can't be cancelled. This ability is based on the Demon Hunter's Metamorphosis ability.
The problem is that the unit it is supposed to change into should have the red tinting colour only, but when I use the ability, the alternate form unit doesn't recieve the tinting colour even though I specified it in the object editor. However, when the duration finishes and it morphs back into its original form unit, that unit becomes tinted even though the tinting for this unit is set to normal (red 255, green, 255, blue 255) in the object editor!

Is this possible to solve without triggering the tinting?
 
Level 12
Joined
Apr 16, 2010
Messages
584
Maybe it has to do something with the model. Because when you use ability it doesn't change color.
So i think the best way is to use triggers.
  • Trigger 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Metamorphosis
    • Actions
      • Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Or you can replace unit with another unit:
  • Unit - Replace (Triggering unit) with a Your unit using The new unit's max life and mana
 
Level 5
Joined
May 20, 2008
Messages
138
Thanks! I was actually just going to post a reply here myself, because I tried changing the vertex colouring with triggers, and it didn't work at all. (I am using the Tauren Cheftain model for both forms. Changing scaling value works properly, tinting colour does not)

The reason I use a local unit variable is because it is supposed to be MUI

  • Warrior Last Stand
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Warrior) Last Stand
    • Actions
      • Custom script: local unit udg_HWARRIOR_laststand_unit
      • Set HWARRIOR_laststand_unit = (Target unit of ability being cast)
      • Animation - Change HWARRIOR_laststand_unit's vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 15.00 seconds
      • Animation - Change HWARRIOR_laststand_unit's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Custom script: set udg_HWARRIOR_laststand_unit = null
I might have to try to replace it, but that might conflift with other triggers and systems I have in the map so I'll use it as a last resort, since I'll have to rewrite some triggers then, like making sure that the replaced unit gets saved to all the correct unit variables for other Warrior related triggers etc.
 
Status
Not open for further replies.
Top