• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How can you "fade" a unit

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Like what you see in quite a few blink-rush moves. They leave like a faded unit behind them. How do you do this?
 
Well, you set the position of the casting unit in a variable, then you create a dummy unit with the model of the hero, facing the facing angle of the caster and every 0.04 seconds you set an integer to Integer1 = Integer1 + 1. Then, in the periodic trigger, Animation - Change the vertex coloring of (Your dummy) to (100%, 100%, 100%) and Integer1% Transparency. If Integer1 Equal to 100, Then Turn off (this trigger) and set Integer1 = 0.
 
Level 11
Joined
Dec 31, 2007
Messages
780
or you can add it a shadow meld ability or something that makes them invisible automatically, set the time you want and make it owned by neutral passive so you cant see it while invisible... then make a trigger with a timer that expires in the amount of time you want (the time it takes the unit to became invisible) and then remove the unit

but perhaps make it invisible via triggers is better :p
 
Level 8
Joined
Aug 1, 2008
Messages
420
Im gonna go with pharaohs method. but i still dont know how to do it.
if anyone can make a sample trigger for me, i would be grateful :p
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • Event
    • Time - every 0.04 seconds
  • Conditions
  • Actions
    • Set Real = Real + 1
    • Animation - change X unit's vertex coloring to 100 100 100 with Real transparency
    • If Real = 100
      • Then
        • Trigger - turn off this trigger
      • Else

when you start casting your ability you have to set Real = 0

PS: i wrote this by heart... so it might be inaccurate
 
  • Fade1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Ability being cast Equal to X
    • Actions
      • Set Position1 = (Position of (Triggering unit))
      • Set Position2 = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Position1 facing Default building facing degrees
      • Unit - Move (Triggering unit) instantly to Position2
      • Set Unit1 = (Last created unit)
      • Trigger - Turn on Untitled Trigger 002 <gen>
      • Custom script: call RemoveLocation (udg_Position1)
      • Custom script: call RemoveLocation (udg_Position2)
  • Untitled Fade2
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set Real1 = (Real1 + 3.00)
      • Animation - Change Unit1's vertex coloring to (100.00%, 100.00%, 100.00%) with Real1% transparency
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Real1 Equal to 100.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
Base the ability off Channel (Or the blink itself, but without the "Move unit action"), create a dummy unit of your hero, with the Locust and Invulnerable abilities and Pathing - Collision Size to 0. Then, create it at the position of the caster.
 
Level 8
Joined
Mar 12, 2008
Messages
437
  • Fade1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Ability being cast Equal to X
    • Actions
      • Set Position1 = (Position of (Triggering unit))
      • Set Position2 = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Position1 facing (Facing angle of (Triggering unit))
      • Custom script: SetUnitX(GetTriggerUnit(), GetLocationX(udg_Position2))
      • Custom script: SetUnitY(GetTriggerUnit(), GetLocationY(udg_Position2))
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add MarkAbility to (Last created unit)
      • Trigger - Turn on Untitled Trigger 002 <gen>
      • Custom script: call RemoveLocation (udg_Position1)
      • Custom script: call RemoveLocation (udg_Position2)
  • Untitled Fade2
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of MarkAbility for (Matching unit)) Greater than or Equal to 1))
        • If - Conditions
          • (Custom value of (Picked unit)) equal to 100
        • Then - Actions
          • Unit - Set custom value of (Picked unit) to ((Set custom value of (Picked unit)) + 5)
          • Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with (Real(custom value of (Picked unit)))% transparency
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Else - Actions
Base the ability off Channel (Or the blink itself, but without the "Move unit action"), create a dummy unit of your hero, with the Locust and Invulnerable abilities and Pathing - Collision Size to 0. Then, create it at the position of the caster.

Modified to make it MUI (I think).

MarkAbility = An ability that doesn't really do anything. You can base it off for example Storm Hammers or Armour Bonus.

It will take one second for it to fade this way btw.
 
Status
Not open for further replies.
Top