- Joined
- Sep 19, 2012
- Messages
- 204
Hey there... i am currently trying to make http://www.hiveworkshop.com/forums/spells-569/holy-dragging-spell-v1-05-a-147719/?prev=search%3Dholy%26d%3Dlist%26r%3D20%26c%3D114 work...everything works fine except one thing...it doesnt do any damage <.<
i tried everything that came to my mind but i still cant figure out where the problem is...any ideas?
Greetings CodeBlack
i tried everything that came to my mind but i still cant figure out where the problem is...any ideas?
-
Holy Dragging Spell Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- -------------------- --------
-
Hashtable - Create a hashtable
-
Set Holy_Dragging_Spell_Hash = (Last created hashtable)
-
-------- -------------------- --------
-
Set HDS_Ability = Holy Dragging Spell
-
Set HDS_Dummy = Footman - (HDS_Dummy)
-
Set HDS_Slow_Buff = Slow - (HDS)
-
Set HDS_Pulls_Allies = False
-
-------- -------------------- --------
-
Set HDS_Duration = 6.00
-
Set HDS_Damage = 200.00
-
Set HDS_Drag_Speed = 6.50
-
Set HDS_Catch_Range = 1000.00
-
Set HDS_Damage_Range = 350.00
-
-------- -------------------- --------
-
-
-
Holy Dragging Spell
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to HDS_Ability
-
-
Actions
-
Set Temp_Unit_1 = (Triggering unit)
-
-------- -------------------- --------
-
Set Temp_Loc_1 = (Target point of ability being cast)
-
-------- -------------------- --------
-
-------- Create a dummy unit at the center of the beacon --------
-
-------- -------------------- --------
-
Unit - Create 1 HDS_Dummy for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
-
Set Temp_Unit_3 = (Last created unit)
-
-------- -------------------- --------
-
-------- Scale the dummy, so the special effect gets scaled too --------
-
-------- -------------------- --------
-
Animation - Change Temp_Unit_3's size to (200.00%, 200.00%, 200.00%) of its original size
-
-------- -------------------- --------
-
-------- Set the time for the beacon --------
-
-------- -------------------- --------
-
Unit - Add a HDS_Duration second Generic expiration timer to Temp_Unit_3
-
-------- -------------------- --------
-
Unit Group - Add Temp_Unit_3 to Holy_Dragging_Spell_Lightning
-
-------- -------------------- --------
-
-------- Store things we need to know about the spell --------
-
-------- -------------------- --------
-
-------- Timer used for the life time of the beacon --------
-
Hashtable - Save (HDS_Duration + 0.01) as (Key timer) of (Key (Last created unit)) in Holy_Dragging_Spell_Hash
-
-------- Store the caster of the beacon --------
-
Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Last created unit)) in Holy_Dragging_Spell_Hash
-
-------- Store the beacon unit for the triggering unit --------
-
Hashtable - Save Handle Of(Last created unit) as (Key beacon) of (Key (Triggering unit)) in Holy_Dragging_Spell_Hash
-
-------- -------------------- --------
-
Set Temp_Group_1 = (Units within HDS_Catch_Range of Temp_Loc_1 matching (((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to Temp_Unit_1)) and (((Matching unit) Not equal to Temp_Unit_1) and (((Unit-type of (Matching unit)) Not equal to Castle) and (((
-
Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
-
Loop - Actions
-
Set Temp_Unit_2 = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Temp_Unit_2 belongs to an enemy of (Triggering player)) Equal to True
-
-
Then - Actions
-
Set Temp_Loc_2 = (Position of Temp_Unit_2)
-
Set Temp_Real_2 = (Angle from Temp_Loc_2 to Temp_Loc_1)
-
-------- -------------------- --------
-
-------- Create a dummy that casts slow on picked unit --------
-
-------- -------------------- --------
-
Unit - Create 1 HDS_Dummy for Neutral Passive at Temp_Loc_2 facing Temp_Real_2 degrees
-
Unit - Order (Last created unit) to Undead Necromancer - Cripple Temp_Unit_2
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
-------- -------------------- --------
-
Unit Group - Add Temp_Unit_2 to Holy_Dragging_Spell_Group
-
-------- -------------------- --------
-
Hashtable - Save HDS_Drag_Speed as (Key escape_timer) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save Temp_Real_2 as (Key angle) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save ((HDS_Damage x (1.00 x 0.03)) x (Real((Level of Rage for Temp_Unit_1)))) as (Key damage) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save Handle OfTemp_Loc_1 as (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save (Distance between Temp_Loc_1 and Temp_Loc_2) as (Key distance) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save Handle OfTemp_Unit_3 as (Key beacon) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
-------- -------------------- --------
-
Custom script: call RemoveLocation(udg_Temp_Loc_2)
-
-------- -------------------- --------
-
-
Else - Actions
-
-
-
-
-------- -------------------- --------
-
-------- Turn on triggers that need to be turned on --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Holy Dragging Spell Group <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Holy Dragging Spell Group <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Holy Dragging Spell Lightning <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Holy Dragging Spell Lightning <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Holy Dragging Spell Cancel <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Holy Dragging Spell Cancel <gen>
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- Remove leak --------
-
-------- -------------------- --------
-
Custom script: call DestroyGroup(udg_Temp_Group_1)
-
-------- -------------------- --------
-
-
-
Holy Dragging Spell Group
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in Holy_Dragging_Spell_Group and do (Actions)
-
Loop - Actions
-
Set Temp_Unit_1 = (Picked unit)
-
Set Temp_Unit_2 = (Load (Key beacon) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
-
Set Temp_Real_1 = (Load (Key distance) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash)
-
-------- -------------------- --------
-
-------- If beacon isn't there or unit has escaped the dragging distance, remove from group --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Temp_Unit_2 is alive) Equal to True
-
Temp_Real_1 Less than HDS_Catch_Range
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Temp_Real_1 Greater than or equal to 33.00
-
-
Then - Actions
-
Set Temp_Loc_1 = (Position of Temp_Unit_1)
-
-------- -------------------- --------
-
Set Temp_Real_3 = (Load (Key angle) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash)
-
-------- -------------------- --------
-
Set Temp_Real_4 = (X of Temp_Loc_1)
-
Set Temp_Real_5 = (Y of Temp_Loc_1)
-
-------- -------------------- --------
-
Set Temp_Real_4 = (Temp_Real_4 + (HDS_Drag_Speed x (Cos(Temp_Real_3))))
-
Set Temp_Real_5 = (Temp_Real_5 + (HDS_Drag_Speed x (Sin(Temp_Real_3))))
-
-------- -------------------- --------
-
Set Temp_Loc_2 = (Point(Temp_Real_4, Temp_Real_5))
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain pathing at Temp_Loc_2 of type Walkability is off) Equal to False
-
-
Then - Actions
-
Custom script: call SetUnitX(udg_Temp_Unit_1, udg_Temp_Real_4)
-
Custom script: call SetUnitY(udg_Temp_Unit_1, udg_Temp_Real_5)
-
-
Else - Actions
-
-
-------- -------------------- --------
-
Custom script: call RemoveLocation(udg_Temp_Loc_1)
-
Custom script: call RemoveLocation(udg_Temp_Loc_2)
-
-------- -------------------- --------
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- Check if unit´is close enough to the beacon to be damaged or healed --------
-
-------- -------------------- --------
-
Set Temp_Loc_1 = (Position of Temp_Unit_1)
-
Set Temp_Loc_2 = (Load (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Temp_Loc_1 and Temp_Loc_2) Less than HDS_Damage_Range
-
-
Then - Actions
-
Set Temp_Unit_2 = (Load (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
-
-------- -------------------- --------
-
-------- Damage enemies, heal allies --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of Temp_Unit_1) is an enemy of (Owner of Temp_Unit_2)) Equal to True
-
-
Then - Actions
-
Unit - Cause Temp_Unit_2 to damage Temp_Unit_1, dealing (Load (Key damage) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash) damage of attack type Chaos and damage type Normal
-
-
Else - Actions
-
Unit - Set life of Temp_Unit_1 to ((Life of Temp_Unit_1) + ((Max life of Temp_Unit_1) x (0.01 / 8.00)))
-
-
-
-
Else - Actions
-
-
-------- -------------------- --------
-
Hashtable - Save (Angle from Temp_Loc_1 to Temp_Loc_2) as (Key angle) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save (Distance between Temp_Loc_2 and Temp_Loc_1) as (Key distance) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
-------- -------------------- --------
-
Custom script: call RemoveLocation(udg_Temp_Loc_1)
-
-
Else - Actions
-
Set Temp_Loc_2 = (Load (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
-
Custom script: call RemoveLocation(udg_Temp_Loc_2)
-
-------- -------------------- --------
-
Unit - Remove HDS_Slow_Buff buff from (Picked unit)
-
-------- -------------------- --------
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
-------- -------------------- --------
-
Unit Group - Remove Temp_Unit_1 from Holy_Dragging_Spell_Group
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Holy_Dragging_Spell_Group is empty) Equal to True
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
-
-
-
-
Holy Dragging Spell Lightning
-
Events
-
Time - Every 0.25 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in Holy_Dragging_Spell_Lightning and do (Actions)
-
Loop - Actions
-
Set Temp_Unit_1 = (Picked unit)
-
Set Temp_Unit_2 = (Load (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
-
Set Temp_Real_1 = (Load (Key timer) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash)
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Temp_Real_1 Greater than 0.01
-
(Temp_Unit_1 is alive) Equal to True
-
-
Then - Actions
-
Set Temp_Loc_1 = (Position of Temp_Unit_1)
-
Set Temp_Group_1 = (Units within HDS_Catch_Range of Temp_Loc_1 matching (((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to Temp_Unit_2)) and (((Matching unit) Not equal to Temp_Unit_1) and (((Unit-type of (Matching unit)) Not equal to Castle) and (((
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Temp_Group_1 is empty) Equal to False
-
-
Then - Actions
-
Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
-
Loop - Actions
-
Set Temp_Unit_3 = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Temp_Unit_3 is in Holy_Dragging_Spell_Group) Equal to False
-
(Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_2)) Equal to True
-
-
Then - Actions
-
Set Temp_Loc_2 = (Position of Temp_Unit_3)
-
-------- -------------------- --------
-
Unit - Create 1 HDS_Dummy for Neutral Passive at Temp_Loc_2 facing Temp_Real_2 degrees
-
Unit - Order (Last created unit) to Undead Necromancer - Cripple Temp_Unit_3
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
-------- -------------------- --------
-
Set Temp_Real_2 = (Angle from Temp_Loc_2 to Temp_Loc_1)
-
-------- -------------------- --------
-
Unit Group - Add Temp_Unit_2 to Holy_Dragging_Spell_Group
-
-------- -------------------- --------
-
Hashtable - Save Handle OfTemp_Loc_1 as (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save Temp_Real_2 as (Key angle) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save HDS_Drag_Speed as (Key escape_timer) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save (Distance between Temp_Loc_1 and Temp_Loc_2) as (Key distance) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save ((HDS_Damage x (1.00 x 0.03)) x (Real((Level of Rage for Temp_Unit_2)))) as (Key damage) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save Handle OfTemp_Unit_1 as (Key beacon) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
Hashtable - Save Handle OfTemp_Unit_2 as (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
-------- -------------------- --------
-
Unit Group - Add Temp_Unit_3 to Holy_Dragging_Spell_Group
-
-------- -------------------- --------
-
Custom script: call RemoveLocation(udg_Temp_Loc_2)
-
-------- -------------------- --------
-
Trigger - Turn on Holy Dragging Spell Group <gen>
-
-
Else - Actions
-
Custom script: call RemoveLocation(udg_Temp_Loc_1)
-
-
-
-
-
-
Else - Actions
-
Custom script: call RemoveLocation(udg_Temp_Loc_1)
-
-
-
Custom script: call DestroyGroup(udg_Temp_Group_1)
-
-------- -------------------- --------
-
Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- -------------------- --------
-
Hashtable - Save (Temp_Real_1 - 0.25) as (Key timer) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
-
Else - Actions
-
Set Temp_Loc_1 = (Load (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
-
Custom script: call RemoveLocation(udg_Temp_Loc_1)
-
-------- -------------------- --------
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Holy_Dragging_Spell_Hash
-
-------- -------------------- --------
-
Unit Group - Remove Temp_Unit_1 from Holy_Dragging_Spell_Lightning
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Holy_Dragging_Spell_Lightning is empty) Equal to True
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Trigger - Turn off Holy Dragging Spell Cancel <gen>
-
-
Else - Actions
-
-
-
-
-
-
-
-
Holy Dragging Spell Cancel
-
Events
-
Unit - A unit Stops casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Holy Dragging Spell
-
-
Actions
-
Unit - Kill (Load (Key beacon) of (Key (Triggering unit)) in Holy_Dragging_Spell_Hash)
-
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Holy_Dragging_Spell_Hash
-
-
Greetings CodeBlack