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: 525

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 The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top