Rocket Launcher!
Made by Kazuga aka Nicke724
Jass/Gui? GUI
Leakless? Yes
MUI? Yes
Laggless? As far as I know yes
Description:
Screenshots:
Code:
Thanks to all who helped me with making the spell.
A great thanks to darkbeer who helped me make this into mui.
Enjoy
Edits:
Fixed the bugg that sometimes made the rocket to glide around a unit.
Fixed the damage bug.
The rocket now explodes when hiting trees and other destructebles.
Made by Kazuga aka Nicke724
Jass/Gui? GUI
Leakless? Yes
MUI? Yes
Laggless? As far as I know yes
Description:
Lanches a rocket towards your enemies. When exploding it will deal damage to all enemies within range.
The rocket is very sensitive and will explode if it hits any wall, enemy unit or flies out over an edge.
Level 1 Damages 200.
Level 2 Damages 250.
Level 3 Damages 300.
The rocket is very sensitive and will explode if it hits any wall, enemy unit or flies out over an edge.
Level 1 Damages 200.
Level 2 Damages 250.
Level 3 Damages 300.
Code:
Cast
Movement
Triggering
Code:
Rocket launcher
Events
Unit - A unit Starts the effect of an ability
Conditions
Or - Any (Conditions) are true
Conditions
(Ability being cast) Equal to Rocket launcher Unchoosable
(Ability being cast) Equal to Rocket launcher Choseable
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RocketLauncherCounter Greater than or equal to 100
Then - Actions
Set RocketLauncherCounter = 2
Else - Actions
Set RocketLauncherCounter = (RocketLauncherCounter + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Rocket launcher Choseable
Then - Actions
Set RocketLauncherRocketPoint = (Position of (Triggering unit))
Set RocketLauncherRocketPoint2 = (Target point of ability being cast)
Set RocketLauncherDirection[RocketLauncherCounter] = (Angle from RocketLauncherRocketPoint to RocketLauncherRocketPoint2)
Custom script: call RemoveLocation(udg_RocketLauncherRocketPoint)
Custom script: call RemoveLocation(udg_RocketLauncherRocketPoint2)
Else - Actions
Set RocketLauncherDirection[RocketLauncherCounter] = (Facing of (Triggering unit))
Set RocketLauncherBoolean[RocketLauncherCounter] = True
Set RocketLauncherCaster[RocketLauncherCounter] = (Triggering unit)
Set RocketLauncherRocketPoint2 = (Position of (Triggering unit))
Set RocketLauncherRocketPoint = (RocketLauncherRocketPoint2 offset by 50.00 towards RocketLauncherDirection[RocketLauncherCounter] degrees)
Custom script: call RemoveLocation(udg_RocketLauncherRocketPoint2)
Sound - Play CannonTowerMissile1 <gen> at 100.00% volume, located at RocketLauncherRocketPoint with Z offset 0.00
Unit - Create 1 Rocket launcher dummy for (Owner of (Triggering unit)) at RocketLauncherRocketPoint facing RocketLauncherDirection[RocketLauncherCounter] degrees
Set RocketLauncherRocket[RocketLauncherCounter] = (Last created unit)
Custom script: call RemoveLocation(udg_RocketLauncherRocketPoint)
Trigger - Add to Rocket Triggering <gen> the event (Unit - A unit comes within 100.00 of RocketLauncherRocket[RocketLauncherCounter])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RocketLauncherCounter Equal to 1
Then - Actions
Countdown Timer - Start RocketLauncherTimer as a Repeating timer that will expire in 0.05 seconds
Else - Actions
Code:
Rocket movement
Events
Time - RocketLauncherTimer expires
Conditions
Actions
For each (Integer RocketLauncherInteger) from 1 to RocketLauncherCounter, do (Actions)
Loop - Actions
Set RocketLauncherRocketPoint = (Position of RocketLauncherRocket[RocketLauncherInteger])
Set RocketLauncherRocketMoveTo = (RocketLauncherRocketPoint offset by 35.00 towards RocketLauncherDirection[RocketLauncherInteger] degrees)
Unit - Move RocketLauncherRocket[RocketLauncherInteger] instantly to RocketLauncherRocketMoveTo
Custom script: call RemoveLocation(udg_RocketLauncherRocketMoveTo)
Set RocketLauncherRocketMoveTo = (RocketLauncherRocketPoint offset by 100.00 towards RocketLauncherDirection[RocketLauncherInteger] degrees)
Set RocketLauncherRocketPoint2 = (Position of RocketLauncherRocket[RocketLauncherInteger])
Set RocketLauncherGroup2 = (Units within 200.00 of RocketLauncherRocketPoint matching ((((Matching unit) belongs to an enemy of (Owner of RocketLauncherRocket[RocketLauncherInteger])) Equal to True) and (((Matching unit) is alive) Equal to True)))
Destructible - Pick every destructible within 200.00 of RocketLauncherRocketPoint and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked destructible) is alive) Equal to True
Then - Actions
Set RocketLauncherBoolean2[RocketLauncherInteger] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Number of units in RocketLauncherGroup2) Greater than or equal to 1
(Terrain pathing at RocketLauncherRocketMoveTo of type Walkability is off) Equal to True
(Distance between RocketLauncherRocketPoint2 and RocketLauncherRocketPoint) Less than or equal to 10.00
RocketLauncherBoolean2[RocketLauncherInteger] Equal to True
Then - Actions
Set RocketLauncherBoolean2[RocketLauncherInteger] = False
Trigger - Run Rocket Triggering <gen> (ignoring conditions)
Set RocketLauncherRocket[RocketLauncherInteger] = RocketLauncherRocket[RocketLauncherCounter]
Set RocketLauncherDirection[RocketLauncherInteger] = RocketLauncherDirection[RocketLauncherCounter]
Set RocketLauncherBoolean[RocketLauncherInteger] = RocketLauncherBoolean[RocketLauncherCounter]
Set RocketLauncherCounter = (RocketLauncherCounter - 1)
Set RocketLauncherInteger = (RocketLauncherInteger - 1)
Else - Actions
Custom script: call RemoveLocation(udg_RocketLauncherRocketPoint)
Custom script: call RemoveLocation(udg_RocketLauncherRocketPoint2)
Custom script: call RemoveLocation(udg_RocketLauncherRocketMoveTo)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RocketLauncherCounter Equal to 0
Then - Actions
Countdown Timer - Pause RocketLauncherTimer
Else - Actions
Code:
Rocket Triggering
Events
Conditions
And - All (Conditions) are true
Conditions
RocketLauncherBoolean[RocketLauncherInteger] Equal to True
((Triggering unit) is A flying unit) Equal to False
Actions
Set RocketLauncherBoolean[RocketLauncherInteger] = False
Set RocketLauncherRocketPoint = (Position of RocketLauncherRocket[RocketLauncherInteger])
Sound - Play CannonTowerMissile2 <gen> at 100.00% volume, located at RocketLauncherRocketPoint with Z offset 0.00
Special Effect - Create a special effect at RocketLauncherRocketPoint using Abilities\Spells\Other\Doom\DoomDeath.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at RocketLauncherRocketPoint using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
Set RocketLauncherSpecial[RocketLauncherInteger] = (Last created special effect)
Set RocketLauncherGroup[RocketLauncherInteger] = (Units within 250.00 of RocketLauncherRocketPoint matching ((((Matching unit) belongs to an enemy of (Owner of RocketLauncherRocket[RocketLauncherCounter])) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A flying unit)
Unit Group - Pick every unit in RocketLauncherGroup[RocketLauncherInteger] and do (Actions)
Loop - Actions
Unit - Cause RocketLauncherCaster[RocketLauncherInteger] to damage (Picked unit), dealing ((((Real((Level of Rocket launcher Choseable for RocketLauncherCaster[RocketLauncherInteger]))) + (Real((Level of Rocket launcher Unchoosable for RocketLauncherCaster[RocketLauncherInteger])))) x 50.00) + 200.00) damage of attack type Chaos and damage type Normal
Unit - Remove RocketLauncherRocket[RocketLauncherInteger] from the game
Custom script: call RemoveLocation(udg_RocketLauncherRocketPoint)
Wait 1.00 seconds
Special Effect - Destroy RocketLauncherSpecial[RocketLauncherInteger]
Thanks to all who helped me with making the spell.
A great thanks to darkbeer who helped me make this into mui.
Enjoy
Edits:
Fixed the bugg that sometimes made the rocket to glide around a unit.
Fixed the damage bug.
The rocket now explodes when hiting trees and other destructebles.