Spell 1.
i have this spell called rocket the hero shoots a rocket at a target point the rocket will shoot out in a strait line any unit hit by the rocket will take damage and a small slow. the spell has a low cool down and when hit a second time the rocket will deal extra damage and will slow the unit by more stacks up to 5 times. i have done all the triggering for the rocket but not the stacks i also havent done the slow effect yet because im unsure what is needed for the stack of the slows.
i have this spell called rocket the hero shoots a rocket at a target point the rocket will shoot out in a strait line any unit hit by the rocket will take damage and a small slow. the spell has a low cool down and when hit a second time the rocket will deal extra damage and will slow the unit by more stacks up to 5 times. i have done all the triggering for the rocket but not the stacks i also havent done the slow effect yet because im unsure what is needed for the stack of the slows.
-
Rocket On
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Rocket
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in WB) Equal to 0
-
Then - Actions
- Trigger - Turn on Rocket Loop <gen>
- Else - Actions
-
If - Conditions
- Set WB_times = (WB_times + 1)
- Set WB_Hero[WB_times] = (Casting unit)
- Set WB_Point[1] = (Position of WB_Hero[WB_times])
- Set WB_Point[2] = (Target point of ability being cast)
- Set WB_Distance[WB_times] = 0.00
- Set Reached_D[WB_times] = 2500.00
- Set WB_Speed[WB_times] = 25.00
- Set WB_Damage[WB_times] = ((Real((Level of Rocket for WB_Hero[WB_times]))) x 40.00)
- Set WB_angel[WB_times] = (Angle from WB_Point[1] to WB_Point[2])
- Unit - Create 1 rocket for (Owner of WB_Hero[WB_times]) at WB_Point[1] facing WB_angel[WB_times] degrees
- Set WB_rocket[WB_times] = (Last created unit)
- Custom script: call RemoveLocation(udg_WB_Point[1])
- Custom script: call RemoveLocation(udg_WB_Point[2])
- Set WB_X[WB_times] = (Position of WB_Hero[WB_times])
- Unit Group - Add WB_Hero[WB_times] to WB
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Rocket Loop
-
Events
- Time - Every 0.02 seconds of game time
- Conditions
-
Actions
-
For each (Integer WB_Loop) from 1 to WB_times, do (Actions)
-
Loop - Actions
- Set WB_Distance[WB_Loop] = (WB_Distance[WB_Loop] + WB_Speed[WB_Loop])
- Set XWB[1] = (WB_X[WB_Loop] offset by WB_Distance[WB_Loop] towards WB_angel[WB_Loop] degrees)
- Unit - Move WB_rocket[WB_Loop] instantly to XWB[1]
- Set WB_Group[WB_Loop] = (Units within 100.00 of XWB[1] matching ((((Matching unit) belongs to an enemy of (Owner of WB_Hero[WB_times])) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in WB_Group[WB_Loop]) Greater than 0
-
Then - Actions
-
Unit Group - Pick every unit in WB_Group[WB_Loop] and do (Actions)
-
Loop - Actions
- Unit - Cause WB_Hero[WB_Loop] to damage (Picked unit), dealing WB_Damage[WB_Loop] damage of attack type Spells and damage type Normal
- Unit - Create 1 dummy for (Owner of WB_Hero[WB_Loop]) at XWB[1] facing Default building facing degrees
- Unit - Add Acid Bomb to (Last created unit)
- Unit - Set level of Acid Bomb for (Last created unit) to ((Level of Rocket for WB_Hero[WB_Loop]) + 0)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
- Custom script: call RemoveLocation(udg_WB_X[udg_WB_Loop])
- Unit Group - Remove WB_Hero[WB_Loop] from WB
- Unit - Kill WB_rocket[WB_Loop]
- Set WB_Hero[WB_Loop] = No unit
- Set WB_Distance[WB_Loop] = 0.00
- Set WB_angel[WB_Loop] = 0.00
- Set WB_Speed[WB_Loop] = 0.00
- Set Reached_D[WB_Loop] = 0.00
- Set WB_Damage[WB_Loop] = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in WB) Equal to 0
-
Then - Actions
- Set WB_times = 0
- Trigger - Turn off Rocket Loop <gen>
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in WB_Group[WB_Loop] and do (Actions)
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup(udg_WB_Group[udg_WB_Loop])
- Custom script: call RemoveLocation(udg_XWB[1])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WB_Distance[WB_Loop] Greater than or equal to Reached_D[WB_Loop]
-
Then - Actions
- Custom script: call RemoveLocation(udg_WB_X[udg_WB_Loop])
-
Unit Group - Pick every unit in Freezed[WB_Loop] and do (Actions)
-
Loop - Actions
- Unit Group - Remove (Picked unit) from Freezed[WB_Loop]
-
Loop - Actions
- Unit Group - Remove WB_Hero[WB_Loop] from WB
- Unit - Kill WB_rocket[WB_Loop]
- Set WB_Hero[WB_Loop] = No unit
- Set WB_Distance[WB_Loop] = 0.00
- Set WB_angel[WB_Loop] = 0.00
- Set WB_Speed[WB_Loop] = 0.00
- Set Reached_D[WB_Loop] = 0.00
- Set WB_Damage[WB_Loop] = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in WB) Equal to 0
-
Then - Actions
- Set WB_times = 0
- Trigger - Turn off Rocket Loop <gen>
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer WB_Loop) from 1 to WB_times, do (Actions)
-
Events