• 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.

Spell Problem

Status
Not open for further replies.
Level 6
Joined
May 9, 2011
Messages
228
anyone knows how to fix this trigger coz when i cast a spell near the shops it will blew the shops away
Massive Blast made by RMX

  • Massive Blast On
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Massive Blast
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in OnorOff) Equal to 0
        • Then - Actions
          • Trigger - Turn on Massive Blast Loop <gen>
        • Else - Actions
      • Set Times2 = (Times2 + 1)
      • Set MB_Caster[Times2] = (Casting unit)
      • -------- For not spamming the abilitie coz it create huge lag if spammed like 800 times still MUI --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (MB_Caster[Times2] is in OnorOff) Equal to False
        • Then - Actions
          • Unit Group - Add MB_Caster[Times2] to OnorOff
          • Set MB_Center[Times2] = (Position of MB_Caster[Times2])
          • Set MBLevel[Times2] = (Level of Massive Blast for MB_Caster[Times2])
          • -------- Settings that can be modified --------
          • Set MB_Speed[Times2] = 16.00
          • Set MB_Distance[Times2] = (((Real(MBLevel[Times2])) x 100.00) + 100.00)
          • Set MB_Formula[Times2] = (MB_Distance[Times2] / MB_Speed[Times2])
          • Set MB_Damage[Times2] = ((Real(MBLevel[Times2])) x 100.00)
          • Set MB_Eyecandy1[Times2] = 90.00
          • -------- This MB_Countbuff is for the effects Set it to 3 if u don't want the game to lag ! --------
          • Set MB_Coutbuff[Times2] = 1
          • -------- 477 range is coz if 450 the unit will have the slow effect but not get sucked into the Blast :) --------
          • -------- It ensures unit getting in that Whirlpool :p --------
          • Set MB_Group[Times2] = (Units within 477.00 of MB_Center[Times2] matching (((Owner of (Matching unit)) Not equal to (Owner of MB_Caster[Times2])) and (((Matching unit) is alive) Equal to True)))
          • Unit Group - Pick every unit in MB_Group[Times2] and do (Actions)
            • Loop - Actions
              • Unit - Turn collision for (Picked unit) Off
          • Set MB_HOW[Times2] = ((MBLevel[Times2] + 1) x 34)
          • -------- ------------------------------------------------------------------ --------
          • Set MB_Switch[Times2] = 0
        • Else - Actions
          • Floating Text - Create floating text that reads |cff03dbffMassive B... above MB_Caster[Times2] with Z offset 0.00, using font size 10.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
          • Set MB_Caster[Times2] = No unit
          • Set Times2 = (Times2 - 1)
  • Massive Blast Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Plz do not touch if u Don't know what ur doing ! --------
      • For each (Integer MB_Loop) from 1 to Times2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MB_Caster[MB_Loop] is in OnorOff) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MB_Switch[MB_Loop] Equal to 0
                • Then - Actions
                  • Set MB_Coutbuff[MB_Loop] = (MB_Coutbuff[MB_Loop] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MB_Coutbuff[MB_Loop] Equal to 0
                    • Then - Actions
                      • Set MB_Coutbuff[MB_Loop] = 1
                      • Set MB_Eyecandy1[MB_Loop] = (MB_Eyecandy1[MB_Loop] + 11.00)
                      • Set MB_Point[6] = (MB_Center[MB_Loop] offset by 250.00 towards (MB_Eyecandy1[MB_Loop] + 90.00) degrees)
                      • Set MB_Point[7] = (MB_Center[MB_Loop] offset by 250.00 towards (MB_Eyecandy1[MB_Loop] + 270.00) degrees)
                      • Set MB_Point[5] = (MB_Center[MB_Loop] offset by 400.00 towards MB_Eyecandy1[MB_Loop] degrees)
                      • Set MB_Point[8] = (MB_Center[MB_Loop] offset by 400.00 towards (MB_Eyecandy1[MB_Loop] + 180.00) degrees)
                      • Special Effect - Create a special effect at MB_Point[8] using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at MB_Point[7] using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at MB_Point[5] using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at MB_Point[6] using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_MB_Point[5])
                      • Custom script: call RemoveLocation(udg_MB_Point[6])
                      • Custom script: call RemoveLocation(udg_MB_Point[7])
                      • Custom script: call RemoveLocation(udg_MB_Point[8])
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 7) Equal to 1
                    • Then - Actions
                      • Special Effect - Create a special effect at MB_Center[MB_Loop] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • Unit Group - Pick every unit in MB_Group[MB_Loop] and do (Actions)
                    • Loop - Actions
                      • Set MB_Point[1] = (Position of (Picked unit))
                      • Set MB_Point[2] = (MB_Point[1] offset by 7.00 towards (Angle from MB_Point[1] to MB_Center[MB_Loop]) degrees)
                      • Unit - Move (Picked unit) instantly to MB_Point[2]
                      • Destructible - Pick every destructible within 150.00 of MB_Point[2] and do (Actions)
                        • Loop - Actions
                          • Destructible - Kill (Picked destructible)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 5) Equal to 1
                        • Then - Actions
                          • Special Effect - Create a special effect at MB_Point[1] using Abilities\Weapons\GryphonRiderMissile\GryphonRiderMissileTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_MB_Point[1])
                      • Custom script: call RemoveLocation(udg_MB_Point[2])
                  • Set MB_HOW[MB_Loop] = (MB_HOW[MB_Loop] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MB_HOW[MB_Loop] Less than or equal to 2
                    • Then - Actions
                      • Set MB_Switch[MB_Loop] = 1
                      • Set MB_Coutbuff[MB_Loop] = 0
                      • Set MB_HOW[MB_Loop] = 0
                      • Set MB_Eyecandy1[MB_Loop] = 0.00
                      • Unit Group - Pick every unit in MB_Group[MB_Loop] and do (Actions)
                        • Loop - Actions
                          • Unit - Cause MB_Caster[MB_Loop] to damage (Picked unit), dealing MB_Damage[MB_Loop] damage of attack type Spells and damage type Cold
                      • Set MB_Damage[MB_Loop] = 0.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in MB_Group[MB_Loop]) Equal to 0
                    • Then - Actions
                      • Unit Group - Pick every unit in MB_Group[MB_Loop] and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked unit) is alive) Equal to True
                            • Then - Actions
                              • Unit - Turn collision for (Picked unit) On
                            • Else - Actions
                      • Custom script: call RemoveLocation(udg_MB_Center[udg_MB_Loop])
                      • Custom script: call DestroyGroup(udg_MB_Group[udg_MB_Loop])
                      • Unit Group - Remove MB_Caster[MB_Loop] from OnorOff
                      • Set MB_Damage[MB_Loop] = 0.00
                      • Set MB_HOW[MB_Loop] = 0
                      • Set MB_Eyecandy1[MB_Loop] = 0.00
                      • Set MB_Speed[MB_Loop] = 0.00
                      • Set MB_Distance[MB_Loop] = 0.00
                      • Set MB_Formula[MB_Loop] = 0.00
                      • Set MBLevel[MB_Loop] = 0
                      • Set MB_Caster[MB_Loop] = No unit
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Number of units in OnorOff) Equal to 0
                        • Then - Actions
                          • Set Times2 = 0
                          • Trigger - Turn off Massive Blast Loop <gen>
                        • Else - Actions
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MB_Switch[MB_Loop] Equal to 1
                    • Then - Actions
                      • Unit Group - Pick every unit in MB_Group[MB_Loop] and do (Actions)
                        • Loop - Actions
                          • Set MB_Point[3] = (Position of (Picked unit))
                          • Set MB_Speed[MB_Loop] = (MB_Distance[MB_Loop] / MB_Formula[MB_Loop])
                          • Set MB_Speed[MB_Loop] = (MB_Speed[MB_Loop] + 0.50)
                          • Set MB_Point[4] = (MB_Point[3] offset by MB_Speed[MB_Loop] towards (Angle from MB_Center[MB_Loop] to MB_Point[3]) degrees)
                          • Unit - Move (Picked unit) instantly to MB_Point[4]
                          • Destructible - Pick every destructible within 150.00 of MB_Point[4] and do (Actions)
                            • Loop - Actions
                              • Destructible - Kill (Picked destructible)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 6) Equal to 1
                            • Then - Actions
                              • Special Effect - Create a special effect at MB_Point[3] using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                          • Custom script: call RemoveLocation(udg_MB_Point[3])
                          • Custom script: call RemoveLocation(udg_MB_Point[4])
                      • Set MB_Distance[MB_Loop] = (MB_Distance[MB_Loop] - MB_Speed[MB_Loop])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • MB_Distance[MB_Loop] Less than or equal to 5.00
                        • Then - Actions
                          • Unit Group - Pick every unit in MB_Group[MB_Loop] and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Picked unit) is alive) Equal to True
                                • Then - Actions
                                  • Unit - Turn collision for (Picked unit) On
                                • Else - Actions
                          • Custom script: call DestroyGroup(udg_MB_Group[udg_MB_Loop])
                          • Custom script: call RemoveLocation(udg_MB_Center[udg_MB_Loop])
                          • Unit Group - Remove MB_Caster[MB_Loop] from OnorOff
                          • Set MB_Speed[MB_Loop] = 0.00
                          • Set MB_Distance[MB_Loop] = 0.00
                          • Set MB_Formula[MB_Loop] = 0.00
                          • Set MBLevel[MB_Loop] = 0
                          • Set MB_Caster[MB_Loop] = No unit
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Number of units in OnorOff) Equal to 0
                            • Then - Actions
                              • Set Times2 = 0
                              • Trigger - Turn off Massive Blast Loop <gen>
                            • Else - Actions
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
 
Why dont you ask RMX first?

Is your shop invurneable?
EDIT This spell picks every unit (for damage and other actions) that is alive and it is an enemy, so it can be building.
Its here:

  • Set MB_Group[Times2] = (Units within 477.00 of MB_Center[Times2] matching (((Owner of (Matching unit)) Not equal to (Owner of MB_Caster[Times2])) and (((Matching unit) is alive) Equal to True)))
 
Level 6
Joined
May 9, 2011
Messages
228
thanks i just set my building to its classification "Mechanical"
+rep
how bout the omnislash of mine..when i try to cast it the caster didnt make himself invulnerable...can you trigger this..after the caster finished the omnislash then he will turn again to vulnerable


  • Omnislash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Omnislash
    • Actions
      • -------- Indexing Start --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Equal to 0
        • Then - Actions
          • -------- If there are currently no instances running, we turn on the loop. --------
          • Trigger - Turn on Omnislash Loop <gen>
        • Else - Actions
      • -------- Increase the indexes --------
      • Set MUI_1 = (MUI_1 + 1)
      • -------- End of Indexing --------
      • -------- Start of Dynamic Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Greater than Max_Index
        • Then - Actions
          • -------- Indexing ~~ --------
          • Set MUI_2[MUI_1] = MUI_1
          • Set Max_Index = MUI_1
        • Else - Actions
      • -------- End of Dynamic Indexing --------
      • -------- Makes it easier to read and cleaner. --------
      • Set Temp = MUI_2[MUI_1]
      • -------- The MUI boolean --------
      • -------- Setting The Caster --------
      • Set CL_Caster[Temp] = (Triggering unit)
      • -------- Setting the Player --------
      • Set CL_Player[Temp] = (Owner of (Triggering unit))
      • -------- Setting the Targeted unit --------
      • Set CL_Target[Temp] = (Target unit of ability being cast)
      • -------- Setting the ability level for the caster --------
      • Set CL_AbilityLevel[Temp] = (Level of Omnislash for (Triggering unit))
      • -------- ***Here you can change the number of slashes*** --------
      • Set CL_Slashes[Temp] = (2 + (3 x CL_AbilityLevel[Temp]))
      • -------- ***Here you can change the damage dealt*** --------
      • Set CL_Damage[Temp] = (80 x CL_AbilityLevel[Temp])
      • -------- ***Here you can change the AOE in which the hero teleports*** --------
      • Set CL_AOE[Temp] = 800.00
      • -------- ***Here you can change the effect on the weapon of the hero*** --------
      • Special Effect - Create a special effect attached to the weapon of CL_Caster[Temp] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
      • -------- This is used to count the slashes --------
      • Set CL_Count[Temp] = 0
      • -------- *** Change this to "False" if you dont want the targeted unit to get slashed first, instead a random unit near him. --------
      • Set CL_FirstTarget[Temp] = True
      • -------- Storing the effect --------
      • Set CL_Special[Temp] = (Last created special effect)
      • -------- Pausing the Caster --------
      • Unit - Pause CL_Caster[Temp]
      • -------- Adding some vertex coloring and transparency (fade). --------
      • Animation - Change CL_Caster[Temp]'s vertex coloring to (40.00%, 40.00%, 40.00%) with 40.00% transparency
      • -------- Changes animation speed for smooth slashing. --------
      • Animation - Change CL_Caster[Temp]'s animation speed to 200.00% of its original speed
      • -------- --------------------------------------------------------- --------
  • Omnislash Loop
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MUI_3) from 1 to MUI_1, do (Actions)
        • Loop - Actions
          • -------- Makes it easier to read and cleaner. --------
          • Set Temp = MUI_2[MUI_3]
          • -------- Counting the number of slashes --------
          • Set CL_Count[Temp] = (CL_Count[Temp] + 1)
          • -------- Setting loc to prevent leak --------
          • Set CL_Loc[1] = (Position of CL_Target[Temp])
          • -------- Setting the group in which the hero warps --------
          • Set CL_Group[1] = (Units within CL_AOE[Temp] of CL_Loc[1] matching ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of CL_Player[Temp]) Equal to True))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CL_FirstTarget[Temp] Equal to True
            • Then - Actions
              • -------- Moving hero to target --------
              • Unit - Move CL_Caster[Temp] instantly to CL_Loc[1]
              • -------- Making the hero face the target --------
              • Unit - Make CL_Caster[Temp] face CL_Loc[1] over 0.00 seconds
              • -------- Damaging the target --------
              • Unit - Cause CL_Caster[Temp] to damage CL_Target[Temp], dealing (Real(CL_Damage[Temp])) damage of attack type Normal and damage type Normal
              • -------- Attack animation for eye candy --------
              • Animation - Play CL_Caster[Temp]'s attack animation
              • -------- The "Blink" effect. You may change this. --------
              • Special Effect - Create a special effect attached to the origin of CL_Caster[Temp] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- Setting the boolean to false else the target will get hit the whole time. --------
              • Set CL_FirstTarget[Temp] = False
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (CL_Caster[Temp] is alive) Equal to True
                  • CL_Count[Temp] Less than or equal to CL_Slashes[Temp]
                  • (Number of units in CL_Group[1]) Greater than 0
                • Then - Actions
                  • -------- Setting the next target of the hero --------
                  • Set CL_Victim[Temp] = (Random unit from CL_Group[1])
                  • -------- Setting the loc of the target to prevent leak --------
                  • Set CL_Loc[2] = (Position of CL_Victim[Temp])
                  • Set CL_Loc[3] = (CL_Loc[2] offset by 50.00 towards (Random angle) degrees)
                  • -------- Moving hero to target --------
                  • Unit - Move CL_Caster[Temp] instantly to CL_Loc[3]
                  • -------- Making the hero face the target --------
                  • Unit - Make CL_Caster[Temp] face CL_Loc[2] over 0.00 seconds
                  • -------- Damaging the target --------
                  • Unit - Cause CL_Caster[Temp] to damage CL_Victim[Temp], dealing (Real(CL_Damage[Temp])) damage of attack type Normal and damage type Normal
                  • -------- Attack animation for eye candy --------
                  • Animation - Play CL_Caster[Temp]'s attack animation
                  • -------- The "Blink" effect. You may change this. --------
                  • Special Effect - Create a special effect attached to the origin of CL_Caster[Temp] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- Removing Point Leaks --------
                  • Custom script: call RemoveLocation( udg_CL_Loc[2] )
                  • Custom script: call RemoveLocation( udg_CL_Loc[3] )
                • Else - Actions
                  • -------- Destroying his weapon effect --------
                  • Special Effect - Destroy CL_Special[Temp]
                  • -------- Unpausing the caster --------
                  • Unit - Unpause CL_Caster[Temp]
                  • -------- Resetting the casters animations --------
                  • Animation - Change CL_Caster[Temp]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • Animation - Reset CL_Caster[Temp]'s animation
                  • -------- Recycling all the indexes --------
                  • Set MUI_2[MUI_3] = MUI_2[MUI_1]
                  • Set MUI_2[MUI_1] = Temp
                  • Set MUI_1 = (MUI_1 - 1)
                  • Set MUI_3 = (MUI_3 - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MUI_1 Equal to 0
                    • Then - Actions
                      • -------- Turning off this trigger. Pointless to keep running --------
                      • Trigger - Turn off (This trigger)
                      • -------- --------------------------------------------------------- --------
                    • Else - Actions
          • -------- Removing Point Leaks --------
          • Custom script: call RemoveLocation( udg_CL_Loc[1] )
          • -------- Removing Group Leak --------
          • Custom script: call DestroyGroup( udg_CL_Group[1] )
 
Status
Not open for further replies.
Top