Spell Rocket Launcher

Kazuga

Let the game begin...
Reaction score
110
Rocket Launcher!
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.
Screenshots:
Code:
Cast
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
Movement
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
Triggering
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:p

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.
 

Attachments

  • Rocket launcher MUI.w3x
    37.8 KB · Views: 517

AdamGriffith

You can change this now in User CP.
Reaction score
69
Yes, this is the right place just incase you were wondering

PS: Good spell (Y)

EDIT: A moderator will hopefully come around soon and test it and then move it to the spells section!
 

Zedzy

ℑΣÐℑΨ
Reaction score
41
The rocket sometimes goes around units, and doesn't blow up. Like when I targeted the gnoll at the start, it was heading towards it, then moved to the side of it.

Other than that, it is a good spell :thup:.
 

Kazuga

Let the game begin...
Reaction score
110
Hm I thought I fixed that before... It has with the detection range, it is set to 200 so a unit has to be within 200 range when the unit moves in order to make it explode. I will look over it after school.

Edit: Fixed, I had forgotten a condition...^^
 

GooS

Azrael
Reaction score
154
what defines the spell level damage, i can only find one action that sets the damage dealt and it's a static 200 damage, not 200/250/300.

Not that hard to fix myself but would still like to know :)?

PS: Neat spell, +rep, helped alot :D
 

Kazuga

Let the game begin...
Reaction score
110
Thanks for pointing that out, strange I'm 99% sure I fixed that part... anyway fixed that to now. Surely hopes that there isn't anything else that needs to be edited in order to get this approved.
 

Kazuga

Let the game begin...
Reaction score
110
Hehe no problem mate^^, I got alot of help from darkbeer so it's no problem.:thup:
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I acually found it rather amusing shooting those rockets at poor defenceless creatures. I didn't go through the code though since GUI bores the crap out of me. Great work + rep.
 
1

131ackout

Guest
oo, pretty rocket launcher ability, but does a unit needs to carry a rocket launcher so he can shoot from it?

+rep
 
1

131ackout

Guest
No, all you need is enough mana and no cooldown;).

Ty:p

your welcome

but do that unit needs to carry rocket launcher

so it would make it more realistic

but okay, anyway

(can the mortars do the shot?)
 

Kazuga

Let the game begin...
Reaction score
110
but do that unit needs to carry rocket launcher

so it would make it more realistic
Not in this spell, I can edit one for you that require rockets if you want but this one is not to be changed unless it's some sort of bug or leak that I have forgot about.

but okay, anyway

(can the mortars do the shot?)
Yes, any unit can. Just pick a hero and teach him the spell and there you go.:thup:
You can also let normal units use it by going into the spell in object editor, go to stats and find "Hero ability - true", change that to false and then you can teach it to normal units.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
ive found a bug...
im shooting the rocket and its sliding along the trees
 

Kazuga

Let the game begin...
Reaction score
110
Ye, I know about that and it's been taken up before... Of what I know there is no way too solve that problem=/ But if you can think of one I will be forever greatful.
 

Kazuga

Let the game begin...
Reaction score
110
Pick every destructible in X range, then, within the loop, increase an integer's value by 1. If (integer) greater than 0, theres a destructible in range, so you can destroy your rocket.

Or, if possible, count the number of destructibles in range of a point (would be easier than the group)
None of those is possible, atleast not with gui, just tried it and there is no actions that counts destructebles or even any destructeble/group destructeble variables...

Edit: Sorry for my spelling, I just can't learn to spell that word..
 

Flare

Stops copies me!
Reaction score
662
I don't think destructible groups leak (at least that's what I have heard)

Code:
Destructible - Pick every destructible in (Region centered at (Position of (Triggering unit)) with size ((Real(Collision radius)), (Real(Collision radius)))) and do (Actions)
    Loop - Actions

Obviously without the region and location leaks :D

You could see whether it leaks by using lots of Pick every Destructable every 0.05 seconds (just CnP the action until you get bored?) and see if your FPS counter makes a noticeable drop at any stage
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top