Spell Rocket Launcher

AdamGriffith

You can change this now in User CP.
Reaction score
69
A snippet from a spell that I made:
Code:
-------- ACTIVATED BY DESTRUCTIBLES --------
Destructible - Pick every destructible within 64.00 of Point2 and do (Set Integer = (Integer + 1))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        Integer Greater than or equal to 1
    Then - Actions
        Sound - Play CannonTowerMissile2 <gen> at 100.00% volume, located at Point2 with Z offset 0.00
        Special Effect - Create a special effect at Point2 using Abilities\Spells\Other\Doom\DoomDeath.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 250.00 at Point2, dealing 500.00 damage of attack type Spells and damage type Normal
        Unit Group - Remove (Picked unit) from Group_Rockets
        Unit - Remove (Picked unit) from the game
    Else - Actions

Set Integer = 0
 

vypur85

Hibernate
Reaction score
803
Actually, you no need to set the Integer. Just pick every destructible. Once destructible is picked, and if there is destructible, then the picked unit (missile dummy) will get removed. Else, nothing will happen. And to kill or 'hurt' destructible, just set their life to a lower value (it will be killed when life drops to 0 or below) or just kill it.

I'm saying this because I'm making a map with similar ability to this Rocket Launcher :p. Just coincidental.

Edit: Also make sure to check whether the destructible is alive.
 

Kazuga

Let the game begin...
Reaction score
110
Can't find the condition for if there is a destructeble in the picked destructeble group. =/ Do you know the name of the condition?
 

vypur85

Hibernate
Reaction score
803
No need the condition. In the 'Movement' trigger, just immediately create a new line and pick every destructible within your rocket dummy.

Code:
Destructible - Pick every destructible within 125.00 of (Position of YourDummy) and do actions
     Loop - Actions
         If then else
              Condition
                 Picked destructible is alive Equal to True
              Then
                 Destructible - Set life of (Picked destructible) to (Life of (Picked destructible) - 50)
                 Unit - Remove YourDummy from the game

Roughly like the above. It will hit a destructible then get removed from the game and reduce the life of the destructible. You can add SFX if you want to but that's up to you to code. :) If there is no destructible, then nothing will happen. The dummy won't get removed and will move as usual.
 

Psiblade94122

In need of sleep
Reaction score
138
well what you can do is for every destrucable add one to an integer variable, then check if that integer is greater then or equal to 1

after all that set that integer back to 0
 

Kazuga

Let the game begin...
Reaction score
110
Thanks Vipur, I will try that, if it works +rep :thup:

well what you can do is for every destrucable add one to an integer variable, then check if that integer is greater then or equal to 1

after all that set that integer back to 0
Your the third or fourth suggesting that, however I don't think you can't do the action "for every destructble"... Will look around once again though.

Edit: Vipur thanks, it worked^^ However is there a way to prevent to do these actions twice? Also the action sometimes buggs the rocket so that every now and then when you shoot it doesn't trigger, meaning that the rocket is stuck at where you shot it... Anyone knows why? It works without that action..
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
                                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
                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
                    Then - Actions
                        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
 

vypur85

Hibernate
Reaction score
803
You can actually use the trigger Adam gave as well. At first I thought using the Integer check was harder than my idea I posted. But, somehow you made it more complicated o_O. Lol... I'm quite confused with what you are doing. Not familiar with your style of triggering. So I can't give much further comment.

In fact my way should be simpler. But not sure why the bolded lines are used (haven't read through all the code):
Code:
                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
                                Trigger - Run Rocket Triggering <gen> (ignoring conditions)
                                [B]Set RocketLauncherRocket[RocketLauncherInteger] = RocketLauncherRocket[RocketLauncherCounter]
                                Set RocketLauncherDirection[RocketLauncherInteger] = RocketLauncherDirection[RocketLauncherCounter]
                                Set RocketLauncherBoolean[RocketLauncherInteger] = RocketLauncherBoolean[RocketLauncherCounter]
                                Set RocketLauncherCounter = (RocketLauncherCounter - 1)
                                Set RocketLauncherInteger = (RocketLauncherInteger - 1)[/B]


Edit:
What about trying this? It's something like Adam's method except that it doesn't use integer, it uses boolean.
Code:
                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
                                [B]Set NEW_BOOLEAN_VAR = True[/B]
                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
                                [B]NEW_BOOLEAN_VAR Equal to True[/B]
                    Then - Actions
                        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)
                [B]Set NEW_BOOLEAN_VAR = False[/B]
 

Kazuga

Let the game begin...
Reaction score
110
Think that one condition can solve it all^^ Thanks for help, edited map and +rep:thup:
 

Kazuga

Let the game begin...
Reaction score
110
I update the thread for 2 reasons:
1: If you don't update your resource it's going to the graveyard.
2: I want a moderator to look through, test and approve it.
 
1

131ackout

Guest
What do you mean

if you don't update it, it's going to graveyard

where all of the old threads are posted there?
 

Flare

Stops copies me!
Reaction score
662
if you don't update it, it's going to graveyard

If a submitted resource isn't suitable for approval, and hasn't been updated to meet approval conditions, it is sent to the graveyard until it has been updated, at that point, it may be approved if it meets the conditions.

where all of the old threads are posted there?

They are either (1) approved (i.e. in one of the subforms, such as Spells, Systems, Tutorials), (2) graveyarded (for the reasons I mentioned above) or (3) still in the Tutorials and Resources sub-forum, either pending approval/moderator to take a look, or just have been forgotten/overlooked
 
1

131ackout

Guest
Oh.
Well i just made a tutorial

I DONT WANNA IT TO BE SENT TO GRAVEYARD :(
 
1

131ackout

Guest
You know

you don't need to bump all at a time...
Everyone, including me know that ability..
 

Kenny

Back for now.
Reaction score
202
It is wise to be patient as right now it seems as though the moderators for the warcraft/spells forums have many different threads/spell/systems etc too look over, so that by itself is time consuming. Plus those moderates have lives too :).
 

Kazuga

Let the game begin...
Reaction score
110
I am, ain't I? I'm just keeping it updated, still even though it's not approved yet people can still use it in their maps since it's fully working mui.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Working and approved.

Moved to the appropriate section.


Good job!


N.B Cleaned your post of bumps.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • 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

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top