- Joined
- Jul 24, 2010
- Messages
- 54
Charge Trigger
However :
- I know there's a leaks somewhere
- The spell's is not efficient
- The special effects are horrible
- I wanna know if this spell will meets the Hive's spell rule?
Note : This is my first spell enhanced trigger....
Well, i need someone who can help to improve my spells a little a bit, or could've been said a lot.
The spell was a Charge, based on DotA's Charge of Darkness, except i don't give it a bonus movement speed and attack speed after the charge.
The spell uses following trigger.
The spell was a Charge, based on DotA's Charge of Darkness, except i don't give it a bonus movement speed and attack speed after the charge.
The spell uses following trigger.
-
CoD Hash
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- Creating the Hashtable --------
-
Hashtable - Create a hashtable
-
-------- Set the Hashtable --------
-
Set CoD_Hash = (Last created hashtable)
-
-
-
CoD Set
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Charge
-
-
Actions
-
-------- Who's the caster --------
-
Set CoD_Caster = (Triggering unit)
-
-------- Who's the target --------
-
Set CoD_Target = (Target unit of ability being cast)
-
-------- Charge speed based on ability's level --------
-
Set CoD_Move_Speed = (10.00 + (15.00 x (Real((Level of Charge for CoD_Caster)))))
-
-------- Duration of the Knockbacked unit --------
-
Set CoD_Dur = 0.80
-
-------- Knockback Speed --------
-
Set CoD_Knockback_Speed = 10.00
-
-------- Saving the handles of the unit and caster to the hashtable --------
-
Hashtable - Save Handle OfCoD_Caster as 1 of (Key (Triggering unit)) in CoD_Hash
-
Hashtable - Save Handle OfCoD_Target as 2 of (Key (Triggering unit)) in CoD_Hash
-
-------- Add the Caster to the group --------
-
Unit Group - Add (Triggering unit) to CoD_Group
-
-
-
CoD Charge
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in CoD_Group and do (Actions)
-
Loop - Actions
-
-------- Load the caster from the Hashtable --------
-
Set CoD_Caster = (Load 1 of (Key (Picked unit)) in CoD_Hash)
-
-------- Load the target from the Hashtable --------
-
Set CoD_Target = (Load 2 of (Key (Picked unit)) in CoD_Hash)
-
-------- Make the caster to face the target --------
-
Unit - Make CoD_Caster face CoD_Target over 0.00 seconds
-
-------- Set the distance between the caster and the target --------
-
Set CoD_Distance = (Distance between (Position of CoD_Caster) and (Position of CoD_Target))
-
-------- IF THEN ELSE --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CoD_Distance Greater than 135.00
-
((Picked unit) is Stunned) Equal to False
-
-
Then - Actions
-
-------- Creates the special effect of the charge --------
-
Set Temp = (Position of CoD_Caster)
-
Special Effect - Create a special effect at Temp using Abilities\Weapons\DemolisherFireMissile\DemolisherFireMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_Temp)
-
-------- Set the angle between the caster and the target --------
-
Set CoD_Angle = (Angle from (Position of CoD_Caster) to (Position of CoD_Target))
-
-------- Turn off the collision of the caster to --------
-
Unit - Turn collision for CoD_Caster Off
-
-------- Charging the caster --------
-
Set Temp = ((Position of CoD_Caster) offset by CoD_Move_Speed towards CoD_Angle degrees)
-
Unit - Move (Picked unit) instantly to Temp
-
Custom script: call RemoveLocation(udg_Temp)
-
-------- Pick every unit nearby the charger --------
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 140.00 of (Position of CoD_Caster)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Picked unit) Not equal to CoD_Caster
-
((Picked unit) is alive) Equal to True
-
((Picked unit) belongs to an ally of (Owner of CoD_Caster)) Equal to False
-
-
Then - Actions
-
Set CoD_Knockback = (Picked unit)
-
Hashtable - Save CoD_Dur as 3 of (Key (Picked unit)) in CoD_Hash
-
Unit Group - Add (Picked unit) to CoD_Knockback_Group
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-------- Remove the caster from the group --------
-
Unit Group - Remove (Picked unit) from CoD_Group
-
-------- Turn on the collision for the caster --------
-
Unit - Turn collision for CoD_Caster On
-
-
-
-
-
Unit Group - Pick every unit in CoD_Knockback_Group and do (Actions)
-
Loop - Actions
-
-------- Load the current time from the hashtable --------
-
Set CoD_Dur = (Load 3 of (Key (Picked unit)) from CoD_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CoD_Dur Greater than 0.00
-
-
Then - Actions
-
-------- Save the current time to the hashtable --------
-
Hashtable - Save (CoD_Dur - 0.04) as 3 of (Key (Picked unit)) in CoD_Hash
-
-------- Knockback the unit --------
-
Set Temp = ((Position of (Picked unit)) offset by CoD_Knockback_Speed towards (Angle from (Position of CoD_Caster) to (Position of (Picked unit))) degrees)
-
Unit - Move (Picked unit) instantly to Temp
-
Custom script: call RemoveLocation(udg_Temp)
-
-------- Creates a speical effect to the knockacked unit --------
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-------- Remove the knockbacked unit from the game --------
-
Unit Group - Remove (Picked unit) from CoD_Knockback_Group
-
-
-
-
-
-
- I know there's a leaks somewhere
- The spell's is not efficient
- The special effects are horrible
- I wanna know if this spell will meets the Hive's spell rule?
Note : This is my first spell enhanced trigger....
Last edited: