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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top