• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Twister v1.2 [GUI]

Raises two hurricans which are spinning around each other, moving every enemy unit around with them, the closer the faster. Additional the Twister throws up stones or water fountains from the ground up in the sky which damage enemies on impact.

---- Triggers ----

  • Twister base
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Twister
    • Actions
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- If there is currently no running instance of this spell, we switch the loop on. --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_IndexSize Equal to 0
        • Then - Actions
          • Trigger - Turn on Twister loop <gen>
        • Else - Actions
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Here we start with the Dynamic Indexes to get this spell MUI. --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • Set TW_IndexSize = (TW_IndexSize + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_IndexSize Greater than TW_Index_MAX
        • Then - Actions
          • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
          • Set TW_Index[TW_IndexSize] = TW_IndexSize
          • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
          • Set TW_Index_MAX = TW_IndexSize
          • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
        • Else - Actions
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- We convert the Index to TW_TempInt to make it easier to understand and to read. --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • Set TW_TempInt = TW_Index[TW_IndexSize]
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- End of Dynamic Index setup. --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The caster of the spell. --------
      • Set TW_caster[TW_TempInt] = (Triggering unit)
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The level of the ability for the caster. --------
      • Set TW_Level = (Level of Twister for TW_caster[TW_TempInt])
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The current position of the caster. It is needed for the creation of the two tornados and to set up their move direction. --------
      • Set TW_Loc[1] = (Position of TW_caster[TW_TempInt])
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Target point of ability being casted. To set up their move direction. --------
      • Set TW_Loc[2] = (Target point of ability being cast)
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The direction in which the twister travels. --------
      • Set TW_angle[(TW_TempInt x 3)] = (Angle from TW_Loc[1] to TW_Loc[2])
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Two get the two tornados 180 degrees from each other apart we use two values which are 180 degrees different. --------
      • Set TW_angle[((TW_TempInt x 3) + 1)] = 0.00
      • Set TW_angle[((TW_TempInt x 3) + 2)] = 180.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- --------------------------------------GLOBALS//CHANGEABLE VARIABLES--------------------------------------- --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Here you can choose which parts of the spells you want to activate. --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- This boolean turns the stones on which are spawnend during the spell. --------
      • Set TW_AspectBoolean[1] = True
      • -------- Here you can activate the destroying of trees. --------
      • Set TW_AspectBoolean[2] = True
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- -------------------------------------STONES------------------------------------- --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_AspectBoolean[1] Equal to True
        • Then - Actions
          • -------- The damage a stone deals when he hits the ground. --------
          • Set TW_dmg[((TW_TempInt x 2) + 1)] = (((Real((Intelligence of TW_caster[TW_TempInt] (Include bonuses)))) x (Real(TW_Level))) x 0.75)
          • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
          • -------- Here we set the chance to spawn a stone in percentage. Every loop instance there is a chance to spawn a stone here for example 10 + ( 5*lvl ) %. --------
          • Set TW_StoneChance[TW_TempInt] = (10 + (TW_Level x 5))
          • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
          • -------- The area where stones damage units. --------
          • Set TW_AoE[2] = 150.00
          • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
          • -------- To change the size of the stones look into the loop Trigger. --------
          • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
        • Else - Actions
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- -------------------------------------BASIC SPELL------------------------------------- --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The damage the units suffer around the twister per instance. --------
      • Set TW_dmg[(TW_TempInt x 2)] = (((Real((Intelligence of TW_caster[TW_TempInt] (Include bonuses)))) x (Real(TW_Level))) x 0.05)
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The distance which the twister will move. It has a basic value + a value per level. --------
      • Set TW_Range[TW_TempInt] = (600.00 + (250.00 x (Real(TW_Level))))
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The distance to the twister Location unit. This number *2 is the distance between the two tornados. --------
      • Set TW_Real[7] = 100.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- This is the speed the twister moves per instance. --------
      • Set TW_MoveSpeed[1] = 15.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The speed with which the tornados spin. --------
      • Set TW_MoveSpeed[2] = 16.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Minimal and Maximal distance the created stones fly. Each Stone gets a random number between the values. --------
      • Set TW_Real[8] = 100.00
      • Set TW_Real[9] = 350.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- An Integer to reduce lagg, because some effects will only created every second time. --------
      • Set TW_SfxCounter[TW_TempInt] = 0
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The tornado model which will be attached to the dummies. --------
      • Set TW_effects[1] = Abilities\Spells\Other\Tornado\TornadoElementalSmall.mdl
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The stone model and the effect when a stone hits the ground. Also it is created periodicly at the position of the twister. --------
      • Set TW_effects[2] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The effect when a stone is created. --------
      • Set TW_effects[3] = Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The effect below the tornados. --------
      • Set TW_effects[5] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- When the tornado is in water the effect will appear. --------
      • Set TW_effects[6] = Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- When the twister is in water this effect will attached to the "stones" instead of the stone model. --------
      • Set TW_effects[7] = Abilities\Weapons\WaterElementalMissile\WaterElementalMissile.mdl
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- When a water missile hits the ground this effect will be spawnend. --------
      • Set TW_effects[8] = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The size of the twister. --------
      • Set TW_Real[1] = 125.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The area in which the tornados pulls and damage units. --------
      • Set TW_AoE[1] = 500.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- In this area trees around the tornados get destryoed. --------
      • Set TW_AoE[3] = 350.00
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- --------------------------------------END GLOBALS//CHANGEABLE VARIABLES--------------------------------------- --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Tree Destroyer --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_Tree_checker Equal to No unit
          • TW_AspectBoolean[2] Equal to True
        • Then - Actions
          • Set TW_Loc[5] = (Point(0.00, 0.00))
          • Unit - Create 1 Arbeiter for Neutral Passive at TW_Loc[5] facing Default building facing (270.0) degrees
          • Set TW_Tree_checker = (Last created unit)
          • Custom script: call RemoveLocation(udg_TW_Loc[5])
          • Unit - Make (Last created unit) Invulnerable
          • Unit - Hide (Last created unit)
        • Else - Actions
      • -------- The twister location unit which we use to determine the middle between the two tornados, and moving them correctly --------
      • Unit - Create 1 Twister dummy for (Owner of TW_caster[TW_TempInt]) at TW_Loc[1] facing Default building facing (270.0) degrees
      • Set Twister_Dummy[(TW_TempInt x 3)] = (Last created unit)
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The two locations to spawn the tornados. We use the offset from above aswell as the degrees. --------
      • Set TW_Loc[3] = (TW_Loc[1] offset by TW_Real[7] towards TW_angle[((TW_TempInt x 3) + 1)] degrees)
      • Set TW_Loc[4] = (TW_Loc[1] offset by TW_Real[7] towards TW_angle[((TW_TempInt x 3) + 2)] degrees)
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • For each (Integer TW_Int) from 1 to 2, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Twister dummy for (Owner of TW_caster[TW_TempInt]) at TW_Loc[(TW_Int + 2)] facing (Random angle) degrees
          • Set Twister_Dummy[((TW_TempInt x 3) + TW_Int)] = (Last created unit)
          • Animation - Change Twister_Dummy[((TW_TempInt x 3) + TW_Int)]'s size to (TW_Real[1]%, TW_Real[1]%, TW_Real[1]%) of its original size
          • Special Effect - Create a special effect attached to the chest of Twister_Dummy[((TW_TempInt x 3) + TW_Int)] using TW_effects[1]
          • Set TW_AttachedEffect[((TW_TempInt x 2) + (TW_Int - 1))] = (Last created special effect)
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Destroying the created leaks. --------
      • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_TW_Loc[1])
      • Custom script: call RemoveLocation(udg_TW_Loc[2])
      • Custom script: call RemoveLocation(udg_TW_Loc[3])
      • Custom script: call RemoveLocation(udg_TW_Loc[4])
  • Twister loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer TW_loop_int) from 1 to TW_IndexSize, do (Actions)
        • Loop - Actions
          • Set TW_TempInt = TW_Index[TW_loop_int]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TW_Range[TW_TempInt] Greater than or equal to 0.00
            • Then - Actions
              • Set TW_Range[TW_TempInt] = (TW_Range[TW_TempInt] - TW_MoveSpeed[1])
              • Set TW_angle[((TW_TempInt x 3) + 1)] = (TW_angle[((TW_TempInt x 3) + 1)] + TW_MoveSpeed[2])
              • Set TW_angle[((TW_TempInt x 3) + 2)] = (TW_angle[((TW_TempInt x 3) + 2)] + TW_MoveSpeed[2])
              • Set TW_Loc[3] = (Position of Twister_Dummy[(TW_TempInt x 3)])
              • Set TW_Loc[4] = (TW_Loc[3] offset by TW_MoveSpeed[1] towards TW_angle[(TW_TempInt x 3)] degrees)
              • Unit - Move Twister_Dummy[(TW_TempInt x 3)] instantly to TW_Loc[4]
              • Set TW_Loc[1] = (TW_Loc[4] offset by TW_Real[7] towards TW_angle[((TW_TempInt x 3) + 1)] degrees)
              • Set TW_Loc[2] = (TW_Loc[4] offset by TW_Real[7] towards TW_angle[((TW_TempInt x 3) + 2)] degrees)
              • For each (Integer TW_Int) from 1 to 2, do (Actions)
                • Loop - Actions
                  • Set TW_IntegerConverter = ((TW_TempInt x 3) + TW_Int)
                  • Set TW_Real[4] = (X of TW_Loc[TW_Int])
                  • Set TW_Real[5] = (Y of TW_Loc[TW_Int])
                  • Custom script: call SetUnitX( udg_Twister_Dummy[udg_TW_IntegerConverter], udg_TW_Real[4])
                  • Custom script: call SetUnitY( udg_Twister_Dummy[udg_TW_IntegerConverter], udg_TW_Real[5])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_AspectBoolean[2] Equal to True
                • Then - Actions
                  • Destructible - Pick every destructible within TW_AoE[3] of TW_Loc[4] 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 TW_Loc[5] = (Position of (Picked destructible))
                          • Custom script: call SetUnitX(udg_TW_Tree_checker, GetWidgetX(GetEnumDestructable() ))
                          • Custom script: call SetUnitY(udg_TW_Tree_checker, GetWidgetY(GetEnumDestructable() ))
                          • Unit - Order TW_Tree_checker to Harvest (Picked destructible)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Current order of TW_Tree_checker) Equal to (Order(harvest))
                            • Then - Actions
                              • Destructible - Kill (Picked destructible)
                              • Special Effect - Create a special effect at TW_Loc[5] using TW_effects[3]
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                          • Custom script: call RemoveLocation (udg_TW_Loc[5])
                          • Unit - Order TW_Tree_checker to Stop
                        • Else - Actions
                • Else - Actions
              • Set TW_SfxCounter[TW_TempInt] = (TW_SfxCounter[TW_TempInt] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_SfxCounter[TW_TempInt] Equal to 3
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at TW_Loc[4] of type Floatability is off) Equal to True
                    • Then - Actions
                      • Special Effect - Create a special effect at TW_Loc[4] using TW_effects[3]
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at TW_Loc[4] using TW_effects[2]
                      • Special Effect - Destroy (Last created special effect)
                      • Environment - Change terrain type at TW_Loc[4] to Lordaeron Summer - Rough Dirt using variation -1 in an area of size 1 and shape Circle
                    • Else - Actions
                      • Special Effect - Create a special effect at TW_Loc[4] using TW_effects[6]
                      • Special Effect - Destroy (Last created special effect)
                  • For each (Integer TW_Int) from 1 to 2, do (Actions)
                    • Loop - Actions
                      • Special Effect - Create a special effect at TW_Loc[TW_Int] using TW_effects[5]
                      • Special Effect - Destroy (Last created special effect)
                  • Set TW_SfxCounter[TW_TempInt] = 0
                • Else - Actions
              • Custom script: call RemoveLocation (udg_TW_Loc[1])
              • Custom script: call RemoveLocation (udg_TW_Loc[2])
              • Custom script: call RemoveLocation (udg_TW_Loc[3])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_AspectBoolean[1] Equal to True
                  • (Random integer number between 1 and 100) Less than or equal to TW_StoneChance[TW_TempInt]
                • Then - Actions
                  • Set TW_StoneIndexSize = (TW_StoneIndexSize + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TW_StoneIndexSize Greater than TW_StoneIndex_MAX
                    • Then - Actions
                      • Set TW_StoneIndex[TW_StoneIndexSize] = TW_StoneIndexSize
                      • Set TW_StoneIndex_MAX = TW_StoneIndexSize
                    • Else - Actions
                  • Set TW_StoneTempInt = TW_StoneIndex[TW_StoneIndexSize]
                  • Set TW_Real[2] = (Random real number between 50.00 and 75.00)
                  • Unit - Create 1 Twister dummy for (Owner of TW_caster[TW_TempInt]) at TW_Loc[4] facing Default building facing (270.0) degrees
                  • Set TW_Stone[TW_StoneTempInt] = (Last created unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at TW_Loc[4] of type Floatability is off) Equal to True
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the chest of TW_Stone[TW_StoneTempInt] using TW_effects[2]
                      • Set TW_StoneEffect[TW_StoneTempInt] = (Last created special effect)
                      • Set WaterLandBoolean[TW_StoneTempInt] = False
                    • Else - Actions
                      • Special Effect - Create a special effect attached to the chest of TW_Stone[TW_StoneTempInt] using TW_effects[7]
                      • Set TW_StoneEffect[TW_StoneTempInt] = (Last created special effect)
                      • Set WaterLandBoolean[TW_StoneTempInt] = True
                  • Animation - Change TW_Stone[TW_StoneTempInt] flying height to 0.00 at 0.00
                  • Animation - Change TW_Stone[TW_StoneTempInt]'s size to (TW_Real[2]%, TW_Real[2]%, TW_Real[2]%) of its original size
                  • Set TW_Loc[3] = (TW_Loc[4] offset by (Random real number between TW_Real[8] and TW_Real[9]) towards (Random angle) degrees)
                  • Set TW_StoneDistance[(TW_StoneTempInt x 2)] = (Distance between TW_Loc[4] and TW_Loc[3])
                  • Set TW_StoneDistance[((TW_StoneTempInt x 2) + 1)] = TW_StoneDistance[(TW_StoneTempInt x 2)]
                  • Set TW_StoneMoveSpeed[TW_StoneTempInt] = (TW_StoneDistance[(TW_StoneTempInt x 2)] x 0.03)
                  • Set TW_StoneHeight[(TW_StoneTempInt x 2)] = (TW_StoneDistance[((TW_StoneTempInt x 2) + 1)] / 3.00)
                  • Set TW_StoneAngle[TW_StoneTempInt] = (Angle from TW_Loc[4] to TW_Loc[3])
                  • Set TW_caster_Convert[TW_StoneTempInt] = TW_caster[TW_TempInt]
                  • Set TW_StoneDamage_Convert[TW_StoneTempInt] = TW_dmg[((TW_TempInt x 2) + 1)]
                  • Custom script: call RemoveLocation (udg_TW_Loc[3])
                • Else - Actions
              • Set TW_group = (Units within TW_AoE[1] of TW_Loc[4] matching ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) has buff Unverwundbar) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A structure) Equa
              • Unit Group - Pick every unit in TW_group and do (Actions)
                • Loop - Actions
                  • Set TW_Loc[1] = (Position of (Picked unit))
                  • Set TW_Real[6] = ((((Distance between TW_Loc[1] and TW_Loc[4]) - (2.00 x (Distance between TW_Loc[1] and TW_Loc[4]))) + 550.00) / 35.00)
                  • Set TW_Loc[2] = (TW_Loc[1] offset by TW_Real[6] towards (Angle from TW_Loc[1] to TW_Loc[4]) degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at TW_Loc[2] of type Walkability is off) Equal to False
                    • Then - Actions
                      • Set TW_Real[4] = (X of TW_Loc[2])
                      • Set TW_Real[5] = (Y of TW_Loc[2])
                      • Custom script: call SetUnitX( GetEnumUnit(), udg_TW_Real[4])
                      • Custom script: call SetUnitY( GetEnumUnit(), udg_TW_Real[5])
                    • Else - Actions
                  • Unit - Cause TW_caster[TW_TempInt] to damage (Picked unit), dealing TW_dmg[(TW_TempInt x 2)] damage of attack type Chaos and damage type Normal
                  • Custom script: call RemoveLocation (udg_TW_Loc[1])
                  • Custom script: call RemoveLocation (udg_TW_Loc[2])
              • Custom script: call RemoveLocation (udg_TW_Loc[4])
              • Custom script: call DestroyGroup (udg_TW_group)
            • Else - Actions
              • For each (Integer TW_Int) from 1 to 2, do (Actions)
                • Loop - Actions
                  • Special Effect - Destroy TW_AttachedEffect[((TW_TempInt x 2) + (TW_Int - 1))]
                  • Unit - Remove Twister_Dummy[((TW_TempInt x 3) + TW_Int)] from the game
              • Unit - Remove Twister_Dummy[(TW_TempInt x 3)] from the game
              • Set TW_Index[TW_loop_int] = TW_Index[TW_IndexSize]
              • Set TW_Index[TW_IndexSize] = TW_TempInt
              • Set TW_IndexSize = (TW_IndexSize - 1)
              • Set TW_loop_int = (TW_loop_int - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_AspectBoolean[1] Equal to True
        • Then - Actions
          • For each (Integer TW_loop2_int) from 1 to TW_StoneIndexSize, do (Actions)
            • Loop - Actions
              • Set TW_StoneTempInt = TW_StoneIndex[TW_loop2_int]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_StoneDistance[(TW_StoneTempInt x 2)] Greater than or equal to 0.00
                • Then - Actions
                  • Set TW_Loc[1] = (Position of TW_Stone[TW_StoneTempInt])
                  • Set TW_Loc[2] = (TW_Loc[1] offset by TW_StoneMoveSpeed[TW_StoneTempInt] towards TW_StoneAngle[TW_StoneTempInt] degrees)
                  • Set TW_Real[4] = (X of TW_Loc[2])
                  • Set TW_Real[5] = (Y of TW_Loc[2])
                  • Custom script: call SetUnitX( udg_TW_Stone[udg_TW_StoneTempInt], udg_TW_Real[4])
                  • Custom script: call SetUnitY( udg_TW_Stone[udg_TW_StoneTempInt], udg_TW_Real[5])
                  • Set TW_StoneHeight[((TW_StoneTempInt x 2) + 1)] = (((4.00 x TW_StoneHeight[(TW_StoneTempInt x 2)]) / TW_StoneDistance[((TW_StoneTempInt x 2) + 1)]) x ((TW_StoneDistance[((TW_StoneTempInt x 2) + 1)] - TW_StoneDistance[(TW_StoneTempInt x 2)]) x (TW_StoneDistance[(TW_StoneTempInt x 2)] / TW_StoneDistance[((TW_S
                  • Animation - Change TW_Stone[TW_StoneTempInt] flying height to TW_StoneHeight[((TW_StoneTempInt x 2) + 1)] at 0.00
                  • Set TW_StoneDistance[(TW_StoneTempInt x 2)] = (TW_StoneDistance[(TW_StoneTempInt x 2)] - TW_StoneMoveSpeed[TW_StoneTempInt])
                  • Custom script: call RemoveLocation (udg_TW_Loc[1])
                  • Custom script: call RemoveLocation (udg_TW_Loc[2])
                • Else - Actions
                  • Set TW_Loc[1] = (Position of TW_Stone[TW_StoneTempInt])
                  • Special Effect - Destroy TW_StoneEffect[TW_StoneTempInt]
                  • Unit - Remove TW_Stone[TW_StoneTempInt] from the game
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • WaterLandBoolean[TW_StoneTempInt] Equal to False
                    • Then - Actions
                      • Special Effect - Create a special effect at TW_Loc[1] using TW_effects[2]
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                      • Special Effect - Create a special effect at TW_Loc[1] using TW_effects[8]
                      • Special Effect - Destroy (Last created special effect)
                  • Set TW_group = (Units within TW_AoE[2] of TW_Loc[1] matching ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) has buff Unverwundbar) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A structure) Equa
                  • Unit Group - Pick every unit in TW_group and do (Actions)
                    • Loop - Actions
                      • Unit - Cause TW_caster_Convert[TW_StoneTempInt] to damage (Picked unit), dealing TW_StoneDamage_Convert[TW_StoneTempInt] damage of attack type Chaos and damage type Normal
                  • Custom script: call DestroyGroup (udg_TW_group)
                  • Set TW_StoneIndex[TW_loop2_int] = TW_StoneIndex[TW_StoneIndexSize]
                  • Set TW_StoneIndex[TW_StoneIndexSize] = TW_StoneTempInt
                  • Set TW_StoneIndexSize = (TW_StoneIndexSize - 1)
                  • Set TW_loop2_int = (TW_loop2_int - 1)
                  • Custom script: call RemoveLocation (udg_TW_Loc[1])
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_IndexSize Equal to 0
          • TW_StoneIndexSize Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
---- Same Trigger documented ----

  • Twister loop Documented
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- We use a loop to check for all running instances and executing their actions. --------
      • For each (Integer TW_loop_int) from 1 to TW_IndexSize, do (Actions)
        • Loop - Actions
          • Set TW_TempInt = TW_Index[TW_loop_int]
          • -------- If the Twister hadn´t reached the maximal range he gets moved. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TW_Range[TW_TempInt] Greater than or equal to 0.00
            • Then - Actions
              • -------- We reduce the max Distance. --------
              • Set TW_Range[TW_TempInt] = (TW_Range[TW_TempInt] - TW_MoveSpeed[1])
              • -------- Setting up the new angles. --------
              • Set TW_angle[((TW_TempInt x 3) + 1)] = (TW_angle[((TW_TempInt x 3) + 1)] + TW_MoveSpeed[2])
              • Set TW_angle[((TW_TempInt x 3) + 2)] = (TW_angle[((TW_TempInt x 3) + 2)] + TW_MoveSpeed[2])
              • -------- The current position of the Twister. --------
              • Set TW_Loc[3] = (Position of Twister_Dummy[(TW_TempInt x 3)])
              • -------- The position we want the tornado to move to. --------
              • Set TW_Loc[4] = (TW_Loc[3] offset by TW_MoveSpeed[1] towards TW_angle[(TW_TempInt x 3)] degrees)
              • -------- Moving the location dummy to determine next time the position of the twister. --------
              • Unit - Move Twister_Dummy[(TW_TempInt x 3)] instantly to TW_Loc[4]
              • -------- The new positions of the the tornados. --------
              • Set TW_Loc[1] = (TW_Loc[4] offset by TW_Real[7] towards TW_angle[((TW_TempInt x 3) + 1)] degrees)
              • Set TW_Loc[2] = (TW_Loc[4] offset by TW_Real[7] towards TW_angle[((TW_TempInt x 3) + 2)] degrees)
              • -------- Moving the tornados with x and y coordinates. --------
              • For each (Integer TW_Int) from 1 to 2, do (Actions)
                • Loop - Actions
                  • -------- Here the number of the twister gets converted for the JASS lines. --------
                  • Set TW_IntegerConverter = ((TW_TempInt x 3) + TW_Int)
                  • Set TW_Real[4] = (X of TW_Loc[TW_Int])
                  • Set TW_Real[5] = (Y of TW_Loc[TW_Int])
                  • Custom script: call SetUnitX( udg_Twister_Dummy[udg_TW_IntegerConverter], udg_TW_Real[4])
                  • Custom script: call SetUnitY( udg_Twister_Dummy[udg_TW_IntegerConverter], udg_TW_Real[5])
              • -------- If the option to destroy trees is activated we check for trees to destroy them. --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_AspectBoolean[2] Equal to True
                • Then - Actions
                  • Destructible - Pick every destructible within TW_AoE[3] of TW_Loc[4] 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
                          • -------- We order our harvest dummy to harvest the destructible, if he is able we know it has to be a tree. --------
                          • Set TW_Loc[5] = (Position of (Picked destructible))
                          • Custom script: call SetUnitX(udg_TW_Tree_checker, GetWidgetX(GetEnumDestructable() ))
                          • Custom script: call SetUnitY(udg_TW_Tree_checker, GetWidgetY(GetEnumDestructable() ))
                          • Unit - Order TW_Tree_checker to Harvest (Picked destructible)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Current order of TW_Tree_checker) Equal to (Order(harvest))
                            • Then - Actions
                              • Destructible - Kill (Picked destructible)
                              • -------- Creating a dust effect at the destroyed tree. --------
                              • Special Effect - Create a special effect at TW_Loc[5] using TW_effects[3]
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                          • Custom script: call RemoveLocation (udg_TW_Loc[5])
                          • Unit - Order TW_Tree_checker to Stop
                        • Else - Actions
                • Else - Actions
              • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
              • -------- Here the Special effect integer gets increased to avoid the spam of sfxs. --------
              • -------- Additional we check if the ground is water or land, changing the effects to the terrain. --------
              • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
              • Set TW_SfxCounter[TW_TempInt] = (TW_SfxCounter[TW_TempInt] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_SfxCounter[TW_TempInt] Equal to 3
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at TW_Loc[4] of type Floatability is off) Equal to True
                    • Then - Actions
                      • Special Effect - Create a special effect at TW_Loc[4] using TW_effects[3]
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at TW_Loc[4] using TW_effects[2]
                      • Special Effect - Destroy (Last created special effect)
                      • Environment - Change terrain type at TW_Loc[4] to Lordaeron Summer - Rough Dirt using variation -1 in an area of size 1 and shape Circle
                    • Else - Actions
                      • Special Effect - Create a special effect at TW_Loc[4] using TW_effects[6]
                      • Special Effect - Destroy (Last created special effect)
                  • For each (Integer TW_Int) from 1 to 2, do (Actions)
                    • Loop - Actions
                      • Special Effect - Create a special effect at TW_Loc[TW_Int] using TW_effects[5]
                      • Special Effect - Destroy (Last created special effect)
                  • Set TW_SfxCounter[TW_TempInt] = 0
                • Else - Actions
              • -------- Removing the produced leaks. --------
              • Custom script: call RemoveLocation (udg_TW_Loc[1])
              • Custom script: call RemoveLocation (udg_TW_Loc[2])
              • Custom script: call RemoveLocation (udg_TW_Loc[3])
              • -------- We check if the condition is fulfilled and when it is we create a stone. --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_AspectBoolean[1] Equal to True
                  • (Random integer number between 1 and 100) Less than or equal to TW_StoneChance[TW_TempInt]
                • Then - Actions
                  • -------- Again we set up the Dynamic index, this time for the stones. --------
                  • Set TW_StoneIndexSize = (TW_StoneIndexSize + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TW_StoneIndexSize Greater than TW_StoneIndex_MAX
                    • Then - Actions
                      • Set TW_StoneIndex[TW_StoneIndexSize] = TW_StoneIndexSize
                      • Set TW_StoneIndex_MAX = TW_StoneIndexSize
                    • Else - Actions
                  • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • Set TW_StoneTempInt = TW_StoneIndex[TW_StoneIndexSize]
                  • -------- End Dynamic Index. --------
                  • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • Set TW_Real[2] = (Random real number between 50.00 and 75.00)
                  • -------- This is our stone dummy. The effect we had chosen before will added to it. --------
                  • Unit - Create 1 Twister dummy for (Owner of TW_caster[TW_TempInt]) at TW_Loc[4] facing Default building facing (270.0) degrees
                  • Set TW_Stone[TW_StoneTempInt] = (Last created unit)
                  • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- If the dummy is created on land it will be a stone, otherwise it will be a water missile. --------
                  • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at TW_Loc[4] of type Floatability is off) Equal to True
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the chest of TW_Stone[TW_StoneTempInt] using TW_effects[2]
                      • Set TW_StoneEffect[TW_StoneTempInt] = (Last created special effect)
                      • -------- A boolean to check later which type of missile it is. --------
                      • -------- Here a Stone. --------
                      • Set WaterLandBoolean[TW_StoneTempInt] = False
                    • Else - Actions
                      • Special Effect - Create a special effect attached to the chest of TW_Stone[TW_StoneTempInt] using TW_effects[7]
                      • Set TW_StoneEffect[TW_StoneTempInt] = (Last created special effect)
                      • -------- A boolean to check later which type of missile it is. --------
                      • -------- Here a Water fountain. --------
                      • Set WaterLandBoolean[TW_StoneTempInt] = True
                  • Animation - Change TW_Stone[TW_StoneTempInt] flying height to 0.00 at 0.00
                  • -------- Giving the stone the size. --------
                  • Animation - Change TW_Stone[TW_StoneTempInt]'s size to (TW_Real[2]%, TW_Real[2]%, TW_Real[2]%) of its original size
                  • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- The point where the stone heads to. --------
                  • Set TW_Loc[3] = (TW_Loc[4] offset by (Random real number between TW_Real[8] and TW_Real[9]) towards (Random angle) degrees)
                  • -------- The distance from the point where the stone is created and the point where the stone should land. --------
                  • Set TW_StoneDistance[(TW_StoneTempInt x 2)] = (Distance between TW_Loc[4] and TW_Loc[3])
                  • -------- This is the same as before but we need it for the parabola. The other value gets periodicly reduced. --------
                  • Set TW_StoneDistance[((TW_StoneTempInt x 2) + 1)] = TW_StoneDistance[(TW_StoneTempInt x 2)]
                  • -------- The speed the stone moves. --------
                  • Set TW_StoneMoveSpeed[TW_StoneTempInt] = (TW_StoneDistance[(TW_StoneTempInt x 2)] x 0.03)
                  • -------- The Max height which the stone will reach. --------
                  • Set TW_StoneHeight[(TW_StoneTempInt x 2)] = (TW_StoneDistance[((TW_StoneTempInt x 2) + 1)] / 3.00)
                  • -------- The flying direction of the stone. --------
                  • Set TW_StoneAngle[TW_StoneTempInt] = (Angle from TW_Loc[4] to TW_Loc[3])
                  • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • Set TW_caster_Convert[TW_StoneTempInt] = TW_caster[TW_TempInt]
                  • Set TW_StoneDamage_Convert[TW_StoneTempInt] = TW_dmg[((TW_TempInt x 2) + 1)]
                  • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- Removing created leaks. --------
                  • Custom script: call RemoveLocation (udg_TW_Loc[3])
                • Else - Actions
              • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
              • -------- The units which will be pulled by the twister and damaged. --------
              • Set TW_group = (Units within TW_AoE[1] of TW_Loc[4] matching ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) has buff Unverwundbar) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A structure) Equa
              • Unit Group - Pick every unit in TW_group and do (Actions)
                • Loop - Actions
                  • -------- Current position of our pulled unit. --------
                  • Set TW_Loc[1] = (Position of (Picked unit))
                  • Set TW_Real[6] = ((((Distance between TW_Loc[1] and TW_Loc[4]) - (2.00 x (Distance between TW_Loc[1] and TW_Loc[4]))) + 550.00) / 35.00)
                  • -------- The position the unit gets moved to. --------
                  • Set TW_Loc[2] = (TW_Loc[1] offset by TW_Real[6] towards (Angle from TW_Loc[1] to TW_Loc[4]) degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at TW_Loc[2] of type Walkability is off) Equal to False
                    • Then - Actions
                      • Set TW_Real[4] = (X of TW_Loc[2])
                      • Set TW_Real[5] = (Y of TW_Loc[2])
                      • Custom script: call SetUnitX( GetEnumUnit(), udg_TW_Real[4])
                      • Custom script: call SetUnitY( GetEnumUnit(), udg_TW_Real[5])
                    • Else - Actions
                  • Unit - Cause TW_caster[TW_TempInt] to damage (Picked unit), dealing TW_dmg[(TW_TempInt x 2)] damage of attack type Chaos and damage type Normal
                  • Custom script: call RemoveLocation (udg_TW_Loc[1])
                  • Custom script: call RemoveLocation (udg_TW_Loc[2])
              • -------- Removing the leaks. --------
              • Custom script: call RemoveLocation (udg_TW_Loc[4])
              • Custom script: call DestroyGroup (udg_TW_group)
            • Else - Actions
              • -------- --------------------------------------------------------------------------------------------------------------------------------------------- --------
              • -------- Destroying the special effect leaks. --------
              • For each (Integer TW_Int) from 1 to 2, do (Actions)
                • Loop - Actions
                  • Special Effect - Destroy TW_AttachedEffect[((TW_TempInt x 2) + (TW_Int - 1))]
                  • Unit - Remove Twister_Dummy[((TW_TempInt x 3) + TW_Int)] from the game
              • Unit - Remove Twister_Dummy[(TW_TempInt x 3)] from the game
              • -------- Decreasing the Index. --------
              • Set TW_Index[TW_loop_int] = TW_Index[TW_IndexSize]
              • Set TW_Index[TW_IndexSize] = TW_TempInt
              • Set TW_IndexSize = (TW_IndexSize - 1)
              • Set TW_loop_int = (TW_loop_int - 1)
      • -------- STONE LOOP --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_AspectBoolean[1] Equal to True
        • Then - Actions
          • For each (Integer TW_loop2_int) from 1 to TW_StoneIndexSize, do (Actions)
            • Loop - Actions
              • Set TW_StoneTempInt = TW_StoneIndex[TW_loop2_int]
              • -------- If the stone had not reached his target point we move him. --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_StoneDistance[(TW_StoneTempInt x 2)] Greater than or equal to 0.00
                • Then - Actions
                  • -------- Current position of the stone. --------
                  • Set TW_Loc[1] = (Position of TW_Stone[TW_StoneTempInt])
                  • -------- New position of the stone. --------
                  • Set TW_Loc[2] = (TW_Loc[1] offset by TW_StoneMoveSpeed[TW_StoneTempInt] towards TW_StoneAngle[TW_StoneTempInt] degrees)
                  • Set TW_Real[4] = (X of TW_Loc[2])
                  • Set TW_Real[5] = (Y of TW_Loc[2])
                  • Custom script: call SetUnitX( udg_TW_Stone[udg_TW_StoneTempInt], udg_TW_Real[4])
                  • Custom script: call SetUnitY( udg_TW_Stone[udg_TW_StoneTempInt], udg_TW_Real[5])
                  • -------- Setting up his height via a parabola formula. --------
                  • Set TW_StoneHeight[((TW_StoneTempInt x 2) + 1)] = (((4.00 x TW_StoneHeight[(TW_StoneTempInt x 2)]) / TW_StoneDistance[((TW_StoneTempInt x 2) + 1)]) x ((TW_StoneDistance[((TW_StoneTempInt x 2) + 1)] - TW_StoneDistance[(TW_StoneTempInt x 2)]) x (TW_StoneDistance[(TW_StoneTempInt x 2)] / TW_StoneDistance[((TW_S
                  • Animation - Change TW_Stone[TW_StoneTempInt] flying height to TW_StoneHeight[((TW_StoneTempInt x 2) + 1)] at 0.00
                  • -------- Decreasing the distance to the targeted point. --------
                  • Set TW_StoneDistance[(TW_StoneTempInt x 2)] = (TW_StoneDistance[(TW_StoneTempInt x 2)] - TW_StoneMoveSpeed[TW_StoneTempInt])
                  • -------- Removing the leaks. --------
                  • Custom script: call RemoveLocation (udg_TW_Loc[1])
                  • Custom script: call RemoveLocation (udg_TW_Loc[2])
                • Else - Actions
                  • -------- So if the stone has reached the target point we set up a variable with his current position. --------
                  • Set TW_Loc[1] = (Position of TW_Stone[TW_StoneTempInt])
                  • -------- Removing the handles. --------
                  • Special Effect - Destroy TW_StoneEffect[TW_StoneTempInt]
                  • Unit - Remove TW_Stone[TW_StoneTempInt] from the game
                  • -------- Creating and destroying the special effect. --------
                  • -------- Checking which type the missile has been. --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • WaterLandBoolean[TW_StoneTempInt] Equal to False
                    • Then - Actions
                      • Special Effect - Create a special effect at TW_Loc[1] using TW_effects[2]
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                      • Special Effect - Create a special effect at TW_Loc[1] using TW_effects[8]
                      • Special Effect - Destroy (Last created special effect)
                  • -------- Picking the units which will be damaged. --------
                  • Set TW_group = (Units within TW_AoE[2] of TW_Loc[1] matching ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) has buff Unverwundbar) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A structure) Equa
                  • Unit Group - Pick every unit in TW_group and do (Actions)
                    • Loop - Actions
                      • Unit - Cause TW_caster_Convert[TW_StoneTempInt] to damage (Picked unit), dealing TW_StoneDamage_Convert[TW_StoneTempInt] damage of attack type Chaos and damage type Normal
                  • Custom script: call DestroyGroup (udg_TW_group)
                  • -------- Reducing the Index. --------
                  • Set TW_StoneIndex[TW_loop2_int] = TW_StoneIndex[TW_StoneIndexSize]
                  • Set TW_StoneIndex[TW_StoneIndexSize] = TW_StoneTempInt
                  • Set TW_StoneIndexSize = (TW_StoneIndexSize - 1)
                  • Set TW_loop2_int = (TW_loop2_int - 1)
                  • -------- Removing the Leaks. --------
                  • Custom script: call RemoveLocation (udg_TW_Loc[1])
        • Else - Actions
      • -------- If there is no twister nor a stone we turn off this trigger. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TW_IndexSize Equal to 0
          • TW_StoneIndexSize Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions

CREDITS goes to Hanky for the Dynamic Index system, D4RK_GANDALF for the tree destroy technique and to the creator of the DUMMY.mdx model.

And finally to me BlackHawk or to my ingame account, S.O.A.D_RoXXX.

Spell should be MUI, Leakless.

Update v1.2: Used 2D-arrays to remove some variables, optimized the code for a better performance, removed the charging energy and added a water/land effect.

~Greetz,
BlackHawk

Keywords:
Tornado, Hurricane, Twister, MUI, Spin, Ground, Stones, Lightning, Wind, Area, Move
Contents

S.O.A.D_RoXXX` s Test Map (Map)

Reviews
19:14, 1st Dec 2009 The_Reborn_Devil: The triggering looks pretty good and there are no leaks. It's also MUI and pretty original. Status: Approved Rating: Useful/Recommended

Moderator

M

Moderator

19:14, 1st Dec 2009
The_Reborn_Devil:
The triggering looks pretty good and there are no leaks.
It's also MUI and pretty original.

Status: Approved
Rating: Useful/Recommended
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
I feel that you have two different tornados and you make actions for each one of them, make small loops instead to reduce the amount of lines, havent really checked all the code but that was what I thought of first, also this will make the spell able to create infitive of tornadoes
 
Level 4
Joined
Nov 8, 2009
Messages
25
You are welcome :)

Unfortunately i have no clue how to do it, maybe with hashtables but i am not skilled in them. But i think it is no big deal because it would just be a few lines less, and creating more tornados would probably lagg the game to hell ^^
 
Level 4
Joined
Nov 8, 2009
Messages
25
Wasn´t the shadowing of globals removed with patch 1.24? But even when not 1. I have no idea what it is xD and 2. don´t think it is possible in gui

Every different solution would need its variables, so in the end we get to the same result i think
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
CREDITS goes to [...] D4RK_GANDALF [...]
thanks a lot :grin:

this spell is great (coding and appearance [personally I don't like the lightning effect at the end but since it is VERY EASY to change it....]) but are you aware of the fact that you are using 50!!!!!! globals????? :eekani:
well....customizability is win but this seems like an overkill
I really don't want you to remake this spell since it will take a lot of clicks but for the next time:
it's possible to use something like 2d-arrays as long as you have one dimension fixed

e.g. if you want to store 2 things for every instance things would look like this:

set i = 1
set x[i*2] = 1
set x[i*2+1] = 2
set i = 2
set x[i*2] = 3
set x[i*2+1] = 4
set i = 3
set x[i*2] = 5
set x[i*2+1] = 6
...

this way you would have an array looking like this:

1 2
3 4
5 6
...

but there also is a tutorial about it (didn't read it though)

5/5 + rep
 
Level 4
Joined
Nov 8, 2009
Messages
25
HAHAAHA I don't get the very much part but if you read it is indeed funny as hell :)

Hmmm is my englisch that bad xDD. I tried to explain that you can disable a lot of functions for the spell, if it seems a little bit overfilled. For example the stones which are spawnend during the spell, or the lightning spiral which appears at the end.

So you can customize the spell for your needs, you only need to change the boolean value.

Hope now its easier to understand what i mean :grin:
 
Level 8
Joined
May 31, 2009
Messages
439
Oh wow, this spell is Sexy. I really love it man, awesome job. 5/5. In all honesty, I'm currently learning how to make advanced spells (As well as trying to make something MUI and using Hash Tables) So I'm not going to bother trying to give you tips, seeing your THAT MUCH better than me :).

5/5 for sure.
 
Top