• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Blink Knockback

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Makes the user of the spell blinks to his enemy and knockback it.

[trigger=]

Blink Knockback
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dash Assault
Actions
Set BK_Cast = (Triggering unit)
Set BK_Target = (Target unit of ability being cast)
Set BK_TargPoint = (Position of BK_Target)
Set BK_CastFace = (Facing of BK_Cast)
Set BK_TargBack = (BK_TargPoint offset by 50.00 towards BK_CastFace degrees)
Set BK_LoopCounter = 0
Unit - Move BK_Cast instantly to BK_TargBack
Unit - Make BK_Cast face BK_Target over 0.01 seconds
Custom script: call RemoveLocation(udg_BK_TargPoint)
Trigger - Turn on BK loop <gen>

[/trigger]

[trigger=]

BK loop
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set BK_CastPoint = (Position of BK_Cast)
Set BK_TargPoint = (Position of BK_Target)
Set BK_Angle = (BK_TargPoint offset by 5.00 towards (Angle from BK_CastPoint to BK_TargPoint) degrees)
Unit - Move BK_Target instantly to BK_Angle
Unit - Cause BK_Cast to damage BK_Target, dealing 10.00 damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect at BK_Angle using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_BK_CastPoint)
Custom script: call RemoveLocation(udg_BK_TargPoint)
Custom script: call RemoveLocation(udg_BK_Angle)
Set BK_LoopCounter = (BK_LoopCounter + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BK_LoopCounter Greater than 50
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions

[/trigger]

Keywords:
Knock,Back,Knockback,Bash,Blink,Blink Knockback
Contents

Blink Knockback (Map)

Reviews
10:17, 19th Sep 2011 Pharaoh_: The spell is not MUI and it is really simple to be approved.

Moderator

M

Moderator

10:17, 19th Sep 2011
Pharaoh_: The spell is not MUI and it is really simple to be approved.
 
Level 12
Joined
Aug 12, 2008
Messages
349
I think I saw this before but forgot where it is.
- First of all, it's not MUI. Try learning either [GUI] Dynamic Indexing Template or GUI Unit Indexer 1.2.0.2
- Besides, you should you use every 0.03 seconds instead of 0.02 seconds. That's the fastest the trigger can run I think.
- The knockback is not smooth enough as you didn't add in any deceleration, etc.
- you don't need the BK_LoopCounter to count the knockback anyway, you should use distance to check for easy configuration
- too simple
 
Top