- Joined
- Aug 1, 2009
- Messages
- 620
I am trying to make a projectile spell that deals AOE damage apon impact, but the spell needs some eye-candy so i made the projectile a little bit more interesting by putting in some more projectiles circling the main bolt.
Problem right now is that the projectile does is not created.
To about trigger 2 it works (if i disable trigger 3 complitely it creates the bolt, but ofcause it is standing still)
Help me if you can please. I think the problem lies with the loading of units from the hashtable but i can't seem to find the error.
Problem right now is that the projectile does is not created.
-
HB Settings
-
Events
- Time - Elapsed game time is 0.20 seconds
- Conditions
-
Actions
- -------- --------- --------
- -------- Leave This (changing them might cause problems) --------
- Hashtable - Create a hashtable
- Set HB_Table = (Last created hashtable)
- -------- --------- --------
- -------- Damage (Scaling is the ammount increased per level) --------
- Set HB_DamageBase = 25.00
- Set HB_DamageScaling = 50.00
- -------- --------- --------
- -------- Speed (Pro speed is for the projectile / Eff speed is the circling bolts) --------
- Set HB_Eff_Speed = 20.00
- Set HB_Pro_Speed = 25.00
- -------- --------- --------
- -------- Area of Effect (Range of area on impact) --------
- Set HB_AoE = 200.00
- -------- --------- --------
- -------- Bolt Size (Influence Lesser bolts distance to main bolt and impact radius) --------
- Set HB_Range = 40.00
-
Events
-
HB Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Holy Bolt
-
Actions
- -------- --------- --------
- -------- Setting initial Variables (do not change anything in this trigger) --------
- Set HB_Caster = (Triggering unit)
- Set HB_Target = (Target unit of ability being cast)
- Hashtable - Save Handle OfHB_Caster as 0 of 2 in HB_Table
- Hashtable - Save Handle OfHB_Target as 1 of 2 in HB_Table
- Set HB_Eff_Flow = 0.00
- Hashtable - Save HB_Eff_Flow as 0 of 4 in HB_Table
- Set HB_Point[2] = (Position of HB_Caster)
- -------- --------- --------
- -------- Creating Dummies (do not change anything in this trigger) --------
- Unit - Create 1 Holy Projectile for (Owner of HB_Caster) at HB_Point[2] facing Default building facing degrees
- Set HB_HPUnit = (Last created unit)
- Unit Group - Add HB_HPUnit to HB_HPGroup[1]
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Set HB_Point[((Integer A) + 2)] = (HB_Point[2] offset by HB_Range towards ((Real((Integer A))) x 60.00) degrees)
- Unit - Create 1 Lesser Projectile for (Owner of HB_Caster) at HB_Point[((Integer A) + 2)] facing Default building facing degrees
- Set HB_LPUnit[(Integer A)] = (Last created unit)
- Hashtable - Save Handle OfHB_LPUnit[(Integer A)] as (Integer A) of 1 in HB_Table
-
Loop - Actions
- Hashtable - Save Handle OfHB_HPUnit as 0 of 1 in HB_Table
- -------- --------- --------
- -------- Removing Leaks and starts loop (do not change anything in this trigger) --------
- Trigger - Turn on HB Loop <gen>
- Custom script: call RemoveLocation(udg_HB_Point[2])
- Custom script: call RemoveLocation(udg_HB_Point[3])
- Custom script: call RemoveLocation(udg_HB_Point[4])
- Custom script: call RemoveLocation(udg_HB_Point[5])
- Custom script: call RemoveLocation(udg_HB_Point[6])
- Custom script: call RemoveLocation(udg_HB_Point[7])
- Custom script: call RemoveLocation(udg_HB_Point[8])
-
Events
-
HB Loop
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in HB_HPGroup[1] and do (Actions)
-
Loop - Actions
- -------- --------- --------
- -------- Loading Units From Table (do not change anything in this trigger) --------
- Set HB_HPUnit = (Load 0 of 1 in HB_Table)
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Set HB_LPUnit[(Integer A)] = (Load (Integer A) of 1 in HB_Table)
-
Loop - Actions
- Set HB_Caster = (Load 0 of 2 in HB_Table)
- Set HB_Target = (Load 1 of 2 in HB_Table)
- -------- --------- --------
- -------- Creating points (do not change anything in this trigger) --------
- Set HB_Point[2] = (Position of HB_HPUnit)
- Set HB_Point[9] = (Position of HB_Target)
- Set HB_Point[1] = (HB_Point[2] offset by HB_Pro_Speed towards (Angle from HB_Point[2] to HB_Point[9]) degrees)
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Set HB_Point[((Integer A) + 9)] = (Position of HB_LPUnit[(Integer A)])
- Set HB_Point[((Integer A) + 2)] = (HB_Point[1] offset by 40.00 towards ((Angle from HB_Point[2] to HB_Point[((Integer A) + 9)]) + HB_Eff_Speed) degrees)
-
Loop - Actions
- -------- --------- --------
- -------- Moving Units (do not change anything in this trigger) --------
- Unit - Move HB_HPUnit instantly to HB_Point[1]
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Unit - Move HB_LPUnit[(Integer A)] instantly to HB_Point[((Integer A) + 2)]
-
Loop - Actions
- -------- --------- --------
- -------- Checking Impact (You can change the number (2) to 1 if you want the bolt to impact at a longer distance) --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between HB_Point[1] and HB_Point[9]) Greater than or equal to (HB_Range / 2.00)
-
Then - Actions
- -------- --------- --------
- -------- Damage and Removing units (do not change anything in this trigger) --------
- Set HB_HPGroup[2] = (Units within HB_AoE of HB_Point[9] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of HB_Caster)) Equal to True))))
- Unit - Cause HB_Caster to damage (Picked unit), dealing (HB_DamageBase + (HB_DamageScaling x (Real((Level of Holy Bolt for HB_Caster))))) damage of attack type Spells and damage type Normal
- Unit - Remove HB_HPUnit from the game
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Unit - Remove HB_LPUnit[(Integer A)] from the game
-
Loop - Actions
- -------- --------- --------
- -------- Removing leaks and ends loop (do not change anything in this trigger) --------
- Trigger - Turn off (This trigger)
- Custom script: call RemoveLocation(udg_HB_Point[1])
- Custom script: call RemoveLocation(udg_HB_Point[2])
- Custom script: call RemoveLocation(udg_HB_Point[3])
- Custom script: call RemoveLocation(udg_HB_Point[4])
- Custom script: call RemoveLocation(udg_HB_Point[5])
- Custom script: call RemoveLocation(udg_HB_Point[6])
- Custom script: call RemoveLocation(udg_HB_Point[7])
- Custom script: call RemoveLocation(udg_HB_Point[8])
- Custom script: call RemoveLocation(udg_HB_Point[9])
- Custom script: call RemoveLocation(udg_HB_Point[10])
- Custom script: call RemoveLocation(udg_HB_Point[11])
- Custom script: call RemoveLocation(udg_HB_Point[12])
- Custom script: call RemoveLocation(udg_HB_Point[13])
- Custom script: call RemoveLocation(udg_HB_Point[14])
- Custom script: call RemoveLocation(udg_HB_Point[15])
- Custom script: call DestroyGroup(udg_HB_HPGroup[2])
-
Else - Actions
- -------- --------- --------
- -------- Check if target is alive (do not change anything in this trigger) --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (HB_Target is dead) Equal to True
-
Then - Actions
- -------- --------- --------
- -------- Removing units (do not change anything in this trigger) --------
- Unit - Remove HB_HPUnit from the game
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Unit - Remove HB_LPUnit[(Integer A)] from the game
-
Loop - Actions
- -------- --------- --------
- -------- Removing leaks and ends loop (do not change anything in this trigger) --------
- Trigger - Turn off (This trigger)
- Custom script: call RemoveLocation(udg_HB_Point[1])
- Custom script: call RemoveLocation(udg_HB_Point[2])
- Custom script: call RemoveLocation(udg_HB_Point[3])
- Custom script: call RemoveLocation(udg_HB_Point[4])
- Custom script: call RemoveLocation(udg_HB_Point[5])
- Custom script: call RemoveLocation(udg_HB_Point[6])
- Custom script: call RemoveLocation(udg_HB_Point[7])
- Custom script: call RemoveLocation(udg_HB_Point[8])
- Custom script: call RemoveLocation(udg_HB_Point[9])
- Custom script: call RemoveLocation(udg_HB_Point[10])
- Custom script: call RemoveLocation(udg_HB_Point[11])
- Custom script: call RemoveLocation(udg_HB_Point[12])
- Custom script: call RemoveLocation(udg_HB_Point[13])
- Custom script: call RemoveLocation(udg_HB_Point[14])
- Custom script: call RemoveLocation(udg_HB_Point[15])
- Custom script: call DestroyGroup(udg_HB_HPGroup[2])
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in HB_HPGroup[1] and do (Actions)
-
Events
To about trigger 2 it works (if i disable trigger 3 complitely it creates the bolt, but ofcause it is standing still)
Help me if you can please. I think the problem lies with the loading of units from the hashtable but i can't seem to find the error.
Last edited: