- Joined
- May 11, 2010
- Messages
- 278
Have i missed any leaks, made stupid things or whatever?
Help is greatly appreciated!
-
Knockback Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Bonk
-
Actions
- Set unit = (Target unit of ability being cast)
- Set KnockAngle = (Angle from (Position of (Triggering unit)) to (Position of unit))
- Set KnockDistance = (800.00 x 0.02)
- Set KnockDuration = 0.50
- Hashtable - Save KnockDistance as (Key distance) of (Key (Target unit of ability being cast)) in KnockTable
- Hashtable - Save KnockAngle as (Key angle) of (Key (Target unit of ability being cast)) in KnockTable
- Hashtable - Save KnockDuration as (Key duration) of (Key (Target unit of ability being cast)) in KnockTable
- Unit Group - Add unit to KnockbackGroup
- Unit - Turn collision for unit Off
-
Events
-
Knockback Loop Normal
-
Events
- Time - Every 0.02 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in KnockbackGroup and do (Actions)
-
Loop - Actions
- Set KnockAngle = (Load (Key angle) of (Key (Picked unit)) from KnockTable)
- Set KnockDistance = (Load (Key distance) of (Key (Picked unit)) from KnockTable)
- Set KnockDuration = (Load (Key duration) of (Key (Picked unit)) from KnockTable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- KnockDuration Greater than 0.00
-
Then - Actions
- Set TempPoint = ((Position of (Picked unit)) offset by KnockDistance towards KnockAngle degrees)
- Unit - Move (Picked unit) instantly to TempPoint, facing (KnockAngle + 180.00) degrees
- Hashtable - Save (KnockDuration - 0.02) as (Key Duration) of (Key (Picked unit)) in KnockTable
- Custom script: call RemoveLocation(udg_TempPoint)
-
Else - Actions
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in KnockTable
- Unit Group - Remove (Picked unit) from KnockbackGroup
- Unit - Turn collision for (Picked unit) On
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in KnockbackGroup and do (Actions)
-
Events
-
Explode
-
Events
- Time - Every 0.02 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Bats and do (Actions)
-
Loop - Actions
- Set BatTargets = (Units within 100.00 of (Position of (Picked unit)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in BatTargets) Greater than 1
-
Then - Actions
- Set TempPoint = (Position of (Picked unit))
- Special Effect - Create a special effect at TempPoint using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_TempPoint)
-
Unit Group - Pick every unit in BatTargets and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Kill (Picked unit)
- Unit Group - Remove (Picked unit) from BatTargets
- Game - Display to (All players) the text: (|CFFFF0303 + ((Proper name of (Picked unit)) + (|R + ( ( + ((Name of (Owner of (Picked unit))) + () + was blown to smithereens!))))))
-
Else - Actions
- Unit - Kill (Picked unit)
- Unit Group - Remove (Picked unit) from BatTargets
- Unit Group - Remove (Picked unit) from Bats
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Else - Actions
- Unit Group - Remove (Picked unit) from BatTargets
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Bats and do (Actions)
-
Events