• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help with spell triggers

Status
Not open for further replies.
Level 8
Joined
Apr 16, 2013
Messages
351
Hello everyone. I'm here to ask help about the triggers of the spell I made. It is supposed to launch three rockets to the sky and after that three missiles coming down after another with a 1 second delay will come down from the sky and will damage the targeted area. But somehow the spell only launches three rockets and then will do nothing. Oh and about the dummy units they are just special effects to make the spell look better. Could someone please help me? What am I doing wrong? I'd appreciate those who would help me.

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Rocket Barrage
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RB_FirstIndex Equal to 0
      • Then - Actions
        • Trigger - Turn on Rocket Barrage Loop <gen>
      • Else - Actions
    • Set RB_FirstIndex = (RB_FirstIndex + 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RB_FirstIndex Greater than RB_MaxIndex
      • Then - Actions
        • Set RB_SecondIndex[RB_FirstIndex] = RB_FirstIndex
        • Set RB_MaxIndex = RB_FirstIndex
      • Else - Actions
    • Set RB_Temporary = RB_SecondIndex[RB_FirstIndex]
    • Set RB_Caster[RB_Temporary] = (Triggering unit)
    • Set RB_Player[RB_Temporary] = (Owner of RB_Caster[RB_Temporary])
    • Set RB_Target[RB_Temporary] = (Target point of ability being cast)
    • Set RB_Level[RB_Temporary] = (Level of Rocket Barrage for RB_Caster[RB_Temporary])
    • Set RB_Boolean = False
    • Set RB_AttackType = Chaos
    • Set RB_DamageType = Universal
    • Set RB_Count[RB_Temporary] = 0
    • Set RB_Waves[RB_Temporary] = 6
    • Set RB_Number[RB_Temporary] = 3
    • Set RB_Multiplier[RB_Temporary] = 2.00
    • Set RB_FirstOrder[RB_Temporary] = (Order(thunderbolt))
    • Set RB_SecondOrder[RB_Temporary] = (Order(innerfire))
    • Set RB_FirstWave[RB_Temporary] = Rocket Barrage Stun
    • Set RB_SecondWave[RB_Temporary] = Rocket Barrage Armor Reducer
    • Set RB_Damage[RB_Temporary] = (((Real(RB_Level[RB_Temporary])) x 25.00) + 75.00)
    • Unit - Create 1 Area for RB_Player[RB_Temporary] at RB_Target[RB_Temporary] facing Default building facing degrees
    • Set RB_Dummy[RB_Temporary] = (Last created unit)
    • Animation - Change RB_Dummy[RB_Temporary]'s animation speed to 0.00% of its original speed
    • Animation - Change RB_Dummy[RB_Temporary]'s size to (700.00%, 700.00%, 700.00%) of its original size
    • Unit - Add a 4.50 second Generic expiration timer to RB_Dummy[RB_Temporary]
  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • For each (Integer RB_ThirdIndex) from 1 to RB_FirstIndex, do (Actions)
      • Loop - Actions
        • Set RB_Temporary = RB_SecondIndex[RB_ThirdIndex]
        • Set RB_Count[RB_Temporary] = (RB_Count[RB_Temporary] + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RB_Count[RB_Temporary] Not equal to RB_Waves[RB_Temporary]
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • RB_Count[RB_Temporary] Less than or equal to RB_Number[RB_Temporary]
              • Then - Actions
                • Special Effect - Create a special effect attached to the overhead of RB_Caster[RB_Temporary] using war3mapImported\RocketFlyUp.mdx
                • Special Effect - Destroy (Last created special effect)
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • RB_Boolean Equal to False
                  • Then - Actions
                    • Set RB_Boolean = True
                    • Special Effect - Create a special effect at RB_Target[RB_Temporary] using war3mapImported\MeteorStrike.mdx
                    • Special Effect - Destroy (Last created special effect)
                    • Animation - Change RB_Dummy[RB_Temporary]'s animation speed to 100.00% of its original speed
                    • Custom script: set bj_wantDestroyGroup = true
                    • Unit Group - Pick every unit in (Units within 500.00 of RB_Target[RB_Temporary] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Not and do (Actions)
                      • Loop - Actions
                        • Set RB_Picked = (Picked unit)
                        • Unit - Cause RB_Caster[RB_Temporary] to damage RB_Picked, dealing RB_Damage[RB_Temporary] damage of attack type RB_AttackType and damage type RB_DamageType
                        • Unit - Create 1 Dummy for (Owner of RB_Picked) at RB_Target[RB_Temporary] facing Default building facing degrees
                        • Set RB_Invisible = (Last created unit)
                        • Unit - Add RB_FirstWave[RB_Temporary] to RB_Invisible
                        • Unit - Set level of RB_FirstWave[RB_Temporary] for RB_Invisible to RB_Level[RB_Temporary]
                        • Custom script: call IssueTargetOrderById(udg_RB_Invisible,udg_RB_FirstOrder[udg_RB_Temporary],udg_RB_Picked)
                        • Unit - Add a 0.50 second Generic expiration timer to RB_Invisible
                    • Unit - Create 1 Area for RB_Player[RB_Temporary] at RB_Target[RB_Temporary] facing Default building facing degrees
                    • Set RB_Dummy[RB_Temporary] = (Last created unit)
                    • Animation - Change RB_Dummy[RB_Temporary]'s animation speed to 0.00% of its original speed
                    • Animation - Change RB_Dummy[RB_Temporary]'s size to (700.00%, 700.00%, 700.00%) of its original size
                    • Unit - Add a 1.50 second Generic expiration timer to RB_Dummy[RB_Temporary]
                  • Else - Actions
                    • Special Effect - Create a special effect at RB_Target[RB_Temporary] using war3mapImported\MeteorStrike.mdx
                    • Special Effect - Destroy (Last created special effect)
                    • Animation - Change RB_Dummy[RB_Temporary]'s animation speed to 100.00% of its original speed
                    • Custom script: set bj_wantDestroyGroup = true
                    • Unit Group - Pick every unit in (Units within 500.00 of RB_Target[RB_Temporary] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Not and do (Actions)
                      • Loop - Actions
                        • Set RB_Picked = (Picked unit)
                        • Unit - Cause RB_Caster[RB_Temporary] to damage RB_Picked, dealing RB_Damage[RB_Temporary] damage of attack type RB_AttackType and damage type RB_DamageType
                        • Unit - Create 1 Dummy for (Owner of RB_Picked) at RB_Target[RB_Temporary] facing Default building facing degrees
                        • Set RB_Invisible = (Last created unit)
                        • Unit - Add RB_SecondWave[RB_Temporary] to RB_Invisible
                        • Unit - Set level of RB_SecondWave[RB_Temporary] for RB_Invisible to RB_Level[RB_Temporary]
                        • Custom script: call IssueTargetOrderById(udg_RB_Invisible,udg_RB_SecondOrder[udg_RB_Temporary],udg_RB_Picked)
                        • Unit - Add a 0.50 second Generic expiration timer to RB_Invisible
                    • Unit - Create 1 Area for RB_Player[RB_Temporary] at RB_Target[RB_Temporary] facing Default building facing degrees
                    • Set RB_Dummy[RB_Temporary] = (Last created unit)
                    • Animation - Change RB_Dummy[RB_Temporary]'s animation speed to 0.00% of its original speed
                    • Animation - Change RB_Dummy[RB_Temporary]'s size to (700.00%, 700.00%, 700.00%) of its original size
                    • Unit - Add a 1.50 second Generic expiration timer to RB_Dummy[RB_Temporary]
          • Else - Actions
            • Special Effect - Create a special effect at RB_Target[RB_Temporary] using war3mapImported\MeteorStrike.mdx
            • Special Effect - Destroy (Last created special effect)
            • Animation - Change RB_Dummy[RB_Temporary]'s animation speed to 100.00% of its original speed
            • Custom script: set bj_wantDestroyGroup = true
            • Unit Group - Pick every unit in (Units within 500.00 of RB_Target[RB_Temporary] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Not and do (Actions)
              • Loop - Actions
                • Set RB_Picked = (Picked unit)
                • Unit - Cause RB_Caster[RB_Temporary] to damage RB_Picked, dealing (RB_Damage[RB_Temporary] x RB_Multiplier[RB_Temporary]) damage of attack type RB_AttackType and damage type RB_DamageType
            • Set RB_SecondIndex[RB_ThirdIndex] = RB_SecondIndex[RB_FirstIndex]
            • Set RB_SecondIndex[RB_FirstIndex] = RB_Temporary
            • Set RB_FirstIndex = (RB_FirstIndex - 1)
            • Set RB_ThirdIndex = (RB_ThirdIndex - 1)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • RB_FirstIndex Equal to 0
              • Then - Actions
                • Trigger - Turn off (This trigger)
              • Else - Actions
        • Custom script: call RemoveLocation(udg_RB_Target[udg_RB_Temporary])
 
Level 13
Joined
Jul 16, 2012
Messages
679
Some spell does not compatible on this
MUI
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • RB_FirstIndex Equal to 0
    • Then - Actions
      • Trigger - Turn on Rocket Barrage Loop <gen>
    • Else - Actions
  • Set RB_FirstIndex = (RB_FirstIndex + 1)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • RB_FirstIndex Greater than RB_MaxIndex
    • Then - Actions
      • Set RB_SecondIndex[RB_FirstIndex] = RB_FirstIndex
      • Set RB_MaxIndex = RB_FirstIndex
    • Else - Actions
  • Set RB_Temporary = RB_SecondIndex[RB_FirstIndex]
Try it to change this in standard :)
MUI
  • Set RB_FirstIndex = (RB_FirstIndex + 1)
If this spell does not work properly.... hmm maybe check your triggers :/
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Custom script: call RemoveLocation(udg_RB_Target[udg_RB_Temporary])


Your problem is this line (at the bottom of loop trigger) is in wrong place.You are trying destroy RB_Target everytime Loop triggers runs.I removed this line from spell and it worked.Put this in appropriate place.
 
Level 13
Joined
Jul 16, 2012
Messages
679
@Ceday
its work properly... xD you found a bug ahah

@Choco
for now, Ceday told you remove this
  • Custom script: call RemoveLocation(udg_RB_Target[udg_RB_Temporary])
lets change your loop

Loop
  • In every rocket impact in target point, you have point leak, just remove it :)
  • Use TempPoint variable to remove leak
  • Rocket Barrage Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RB_ThirdIndex) from 1 to RB_FirstIndex, do (Actions)
        • Loop - Actions
          • Set RB_Temporary = RB_SecondIndex[RB_ThirdIndex]
          • Set RB_Time[RB_Temporary] = (RB_Time[RB_Temporary] + 1)
          • Set RB_Count[RB_Temporary] = (RB_Count[RB_Temporary] + 1)
          • Set RB_Group[RB_Temporary] = (Units within 500.00 of RB_Target[RB_Temporary] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and ((((Matching unit) is alive)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RB_Count[RB_Temporary] Not equal to RB_Waves[RB_Temporary]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RB_Time[RB_Temporary] Less than or equal to RB_Number[RB_Temporary]
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of RB_Caster[RB_Temporary] using war3mapImported\RocketFlyUp.mdx
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RB_Boolean[RB_Temporary] Equal to False
                    • Then - Actions
                      • Set TempPoint = (Position of RB_Dummy[RB_Temporary])
                      • Special Effect - Create a special effect at TempPoint using war3mapImported\MeteorStrike.mdx
                      • Special Effect - Destroy (Last created special effect)
                      • Animation - Change RB_Dummy[RB_Temporary]'s animation speed to 100.00% of its original speed
                      • Custom script: call RemoveLocation(udg_TempPoint)
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in RB_Group[RB_Temporary] and do (Actions)
                        • Loop - Actions
                          • Set RB_Picked = (Picked unit)
                          • Unit - Cause RB_Caster[RB_Temporary] to damage RB_Picked, dealing RB_Damage[RB_Temporary] damage of attack type RB_AttackType[RB_Temporary] and damage type RB_DamageType[RB_Temporary]
                          • Unit - Create 1 Dummy for (Owner of RB_Picked) at RB_Target[RB_Temporary] facing Default building facing degrees
                          • Set RB_Invisible = (Last created unit)
                          • Unit - Add RB_FirstWave[RB_Temporary] to RB_Invisible
                          • Unit - Set level of RB_FirstWave[RB_Temporary] for RB_Invisible to RB_Level[RB_Temporary]
                          • Custom script: call IssueTargetOrderById(udg_RB_Invisible,udg_RB_FirstOrder[udg_RB_Temporary],udg_RB_Picked)
                          • Unit - Add a 0.50 second Generic expiration timer to RB_Invisible
                      • Unit - Create 1 Area for RB_Player[RB_Temporary] at RB_Target[RB_Temporary] facing Default building facing degrees
                      • Set RB_FirstUnit[RB_Temporary] = (Last created unit)
                      • Animation - Change RB_FirstUnit[RB_Temporary]'s animation speed to 0.00% of its original speed
                      • Animation - Change RB_FirstUnit[RB_Temporary]'s size to (700.00%, 700.00%, 700.00%) of its original size
                      • Unit - Add a 1.50 second Generic expiration timer to RB_FirstUnit[RB_Temporary]
                      • Set RB_Boolean[RB_Temporary] = True
                    • Else - Actions
                      • Set TempPoint = (Position of RB_Dummy[RB_Temporary])
                      • Special Effect - Create a special effect at TempPoint using war3mapImported\MeteorStrike.mdx
                      • Special Effect - Destroy (Last created special effect)
                      • Animation - Change RB_FirstUnit[RB_Temporary]'s animation speed to 100.00% of its original speed
                      • Custom script: call RemoveLocation(udg_TempPoint)
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in RB_Group[RB_Temporary] and do (Actions)
                        • Loop - Actions
                          • Set RB_Picked = (Picked unit)
                          • Unit - Cause RB_Caster[RB_Temporary] to damage RB_Picked, dealing RB_Damage[RB_Temporary] damage of attack type RB_AttackType[RB_Temporary] and damage type RB_DamageType[RB_Temporary]
                          • Unit - Create 1 Dummy for (Owner of RB_Picked) at RB_Target[RB_Temporary] facing Default building facing degrees
                          • Set RB_Invisible = (Last created unit)
                          • Unit - Add RB_SecondWave[RB_Temporary] to RB_Invisible
                          • Unit - Set level of RB_SecondWave[RB_Temporary] for RB_Invisible to RB_Level[RB_Temporary]
                          • Custom script: call IssueTargetOrderById(udg_RB_Invisible,udg_RB_SecondOrder[udg_RB_Temporary],udg_RB_Picked)
                          • Unit - Add a 0.50 second Generic expiration timer to RB_Invisible
                      • Unit - Create 1 Area for RB_Player[RB_Temporary] at RB_Target[RB_Temporary] facing Default building facing degrees
                      • Set RB_SecondUnit[RB_Temporary] = (Last created unit)
                      • Animation - Change RB_SecondUnit[RB_Temporary]'s animation speed to 0.00% of its original speed
                      • Animation - Change RB_SecondUnit[RB_Temporary]'s size to (700.00%, 700.00%, 700.00%) of its original size
                      • Unit - Add a 1.50 second Generic expiration timer to RB_SecondUnit[RB_Temporary]
            • Else - Actions
              • Set TempPoint = (Position of RB_Dummy[RB_Temporary])
              • Special Effect - Create a special effect at TempPoint using war3mapImported\MeteorStrike.mdx
              • Special Effect - Destroy (Last created special effect)
              • Animation - Change RB_SecondUnit[RB_Temporary]'s animation speed to 100.00% of its original speed
              • Custom script: call RemoveLocation(udg_TempPoint)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in RB_Group[RB_Temporary] and do (Actions)
                • Loop - Actions
                  • Set RB_Picked = (Picked unit)
                  • Unit - Cause RB_Caster[RB_Temporary] to damage RB_Picked, dealing (RB_Damage[RB_Temporary] x RB_Multiplier[RB_Temporary]) damage of attack type RB_AttackType[RB_Temporary] and damage type RB_DamageType[RB_Temporary]
              • Set RB_SecondIndex[RB_ThirdIndex] = RB_SecondIndex[RB_FirstIndex]
              • Set RB_SecondIndex[RB_FirstIndex] = RB_Temporary
              • Set RB_FirstIndex = (RB_FirstIndex - 1)
              • Set RB_ThirdIndex = (RB_ThirdIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RB_FirstIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 

Attachments

  • [FIXED] Rocket Barrage.w3x
    38.6 KB · Views: 54
Status
Not open for further replies.
Top