Spell Fade

soulreaping

New Member
Reaction score
17
I was a little bored and this spell idea came to my mind.

This spell is in GUI, and it's pretty much leakless (checked with Leak Check v2).

The hero slowly fades in into the darkness, making him hard to see and hard to hit.
After 30 seconds, the hero will slowly fade out from the darkness, losing his evasion.

Level 1 - Grants 10% evasion.
Level 2 - Grants 20% evasion.
Level 3 - Grants 30% evasion.
Level 4 - Grants 40% evasion.


Triggers:

Fade1:

Fade1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fade
Actions
Set FD_CurrentPos = (Position of (Triggering unit))
Set FD_AngleBetween = (Facing of (Triggering unit))
Set FD_NewPos = (FD_CurrentPos offset by 500.00 towards FD_AngleBetween degrees)
Set FD_DistanceBetween = (Distance between FD_CurrentPos and FD_NewPos)
Set FD_DistanceTraveled = 0.00
Set FD_Unit = (Triggering unit)
Custom script: call RemoveLocation(udg_FD_CurrentPos)
Custom script: call RemoveLocation(udg_FD_NewPos)
Unit - Pause FD_Unit
Unit - Turn collision for FD_Unit Off
Trigger - Turn on Fade2 <gen>

Fade2 (initially off):
Fade2
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FD_DistanceTraveled Greater than FD_DistanceBetween
Then - Actions
Unit - Unpause FD_Unit
Set FD_DistanceTraveled = 0.00
Set FD_DistanceBetween = 0.00
Unit - Turn collision for FD_Unit On
Unit - Add FadeEvasion to FD_Unit
Unit - Set level of FadeEvasion for FD_Unit to (Level of Fade for FD_Unit)
Countdown Timer - Start FD_Timer as a One-shot timer that will expire in 30.00 seconds
Trigger - Turn on Fade3 <gen>
Custom script: call RemoveLocation(udg_FD_CurrentPos)
Custom script: call RemoveLocation(udg_FD_NewPos)
Trigger - Turn off (This trigger)
Else - Actions
Set FD_CurrentPos = (Position of FD_Unit)
Set FD_NewPos = (FD_CurrentPos offset by 5.00 towards FD_AngleBetween degrees)
Animation - Change FD_Unit's vertex coloring to (100.00%, 100.00%, 100.00%) with (0.00 + (FD_DistanceTraveled / 5.00))% transparency
Unit - Move FD_Unit instantly to FD_NewPos
Set FD_DistanceTraveled = (FD_DistanceTraveled + 5.00)
Custom script: call RemoveLocation(udg_FD_CurrentPos)
Custom script: call RemoveLocation(udg_FD_NewPos)

Fade3(initially off):
Fade3
Events
Time - FD_Timer expires
Conditions
Actions
Unit - Remove FadeEvasion from FD_Unit
Trigger - Turn on FadeOut <gen>
Countdown Timer - Hide (Last created timer window)
Trigger - Turn off (This trigger)

FadeOut (initially off):
FadeOut
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FD_FadeOutInterval Greater than 500.00
Then - Actions
Set FD_FadeOutInterval = 0.00
Trigger - Turn off (This trigger)
Else - Actions
Animation - Change FD_Unit's vertex coloring to (100.00%, 100.00%, 100.00%) with (100.00 - (FD_FadeOutInterval / 5.00))% transparency
Set FD_FadeOutInterval = (FD_FadeOutInterval + 5.00)

This is pretty much leakless AFAIK.

Please note that the evasion part isn't very efficient in my opinion, but I didn't find any other way to do the temporary evasion.

Please note that I have imported 2 icons so I can hide as much as possible the added evasion skill.

You may edit this as much as you want, also I don't mind if you use it on your maps without credit, it's not a stunning spell, very easy to do.

Thanks Tinki3 for his spell map template.

Please comment.

Cheers
 

Attachments

  • FadeSpell.w3x
    58.4 KB · Views: 230

Tinki3

Special Member
Reaction score
418
Cool spell :).

In the "Fade2" trigger, in the "Then-Actions", you are removing those 2
locations even though they aren't set before-hand in that trigger.
Remove those 2 lines of Custom Script.

In the "Fade3" trigger you are hiding a timer-window that doesn't exist.
Timer windows are seperate to timers themselves.
Remove that line.

All else seems fine.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top