• 🏆 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!

Magnetic Saw Trap v1.063

The first spell I have created officially in a long time, I got the inpiration for this spell through playing RA3 too much like the good little game addict I am. It's very obvious which of the units I got the idea from if you play RA3 :p

The spell is simple yet I think gives quite a good effect. I was trying to take a step down from the 'huge omg bbq' ultimates I was creating before hand as this will have many more uses in general maps (I hope)

Now it works like this:
You use the spell on the ground
A magnetic Centre appears with multiple saws around it
Nearby units (Aoe changes each level )are pulled into the centre (Speed changes every level)
Once units are within 'sawing' range they will begin taking damage (Damage changes every level
After either the Trap is destroyed (by attacking) or it's expiration timer ends (Changes each level) all units will be released from the magnetic effect.

I added a bit of eye candy as otherwise it would look really weird when units went moving into it. I wanted it to be a bit more than just a battle trap so I made the test map a bit differant, But hopefully it's better than your average test map.

Triggers:
  • Saw setup
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • -------- Creates the hashtable --------
      • Hashtable - Create a hashtable
      • -------- Sets the variable as the hastable so It will nto collide with other hashtables --------
      • Set Magnetic_Saw_Hash = (Last created hashtable)
      • -------- Magnetic strength --------
      • Set Config[1] = 1
      • -------- Magnetic AOE --------
      • Set Config[2] = 300
      • -------- Saw Stength --------
      • Set Config[3] = 2
      • -------- Duration --------
      • Set Config[4] = 10
      • -------- Number of saws --------
      • Set Config[5] = 8
  • Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Magnetic saw trap
    • Actions
      • -------- Sets the point were the magnetic saw will be created --------
      • Set Temp_Point[4] = (Target point of ability being cast)
      • -------- Creates the 'summoning' Sfx --------
      • Special Effect - Create a special effect at Temp_Point[4] using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • -------- Kills the SFX instantly so it doesn't stay indefinatly --------
      • Special Effect - Destroy (Last created special effect)
      • -------- Creates the magnetic saw at the targeted point --------
      • Unit - Create 1 Magnetic Saw Trap for (Owner of (Triggering unit)) at Temp_Point[4] facing Default building facing degrees
      • -------- Calculated the druation time, to modify look in Saw setup --------
      • Unit - Add a ((Real(Config[4])) x (Real((Level of Magnetic saw trap for (Triggering unit))))) second Generic expiration timer to (Last created unit)
      • -------- Adds the unit to the saw group --------
      • Unit Group - Add (Last created unit) to Saws
      • -------- Removes the leak --------
      • Custom script: call RemoveLocation (udg_Temp_Point[4])
      • -------- Links The triggering unit and the Saw --------
      • Hashtable - Save Handle Of(Triggering unit) as 10 of (Key (Last created unit)) in Magnetic_Saw_Hash
      • -------- Magnetic strength, Modify in saw setup --------
      • Hashtable - Save ((Level of Magnetic saw trap for (Triggering unit)) x Config[1]) as 11 of (Key (Last created unit)) in Magnetic_Saw_Hash
      • -------- Magnetic AOE, Modify in saw setup --------
      • Hashtable - Save ((Level of Magnetic saw trap for (Triggering unit)) x Config[2]) as 12 of (Key (Last created unit)) in Magnetic_Saw_Hash
      • -------- Saw damage, Modify in saw setup --------
      • Hashtable - Save ((Level of Magnetic saw trap for (Triggering unit)) x Config[3]) as 13 of (Key (Last created unit)) in Magnetic_Saw_Hash
      • -------- Creates the Sfx around the saw --------
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Orc\Voodoo\VoodooAura.mdl
      • -------- This variable is set to this so the Sfx and numbers do not collide to prevent confusion --------
      • Set Saw_Creation = 22
      • -------- Creates the 'saws' --------
      • For each (Integer Debug) from 1 to Config[5], do (Actions)
        • Loop - Actions
          • -------- Sets the location of were the saw is --------
          • Set Temp_Point[4] = (Target point of ability being cast)
          • -------- Sets were the saw will be --------
          • Set Temp_Point[5] = (Temp_Point[4] offset by 100.00 towards Circle degrees)
          • -------- Creates the saw --------
          • Special Effect - Create a special effect at Temp_Point[5] using Abilities\Weapons\SentinelMissile\SentinelMissile.mdl
          • -------- Removes leaks --------
          • Custom script: call RemoveLocation (udg_Temp_Point[5])
          • -------- Removes leaks --------
          • Custom script: call RemoveLocation (udg_Temp_Point[4])
          • -------- Saves the SFX so it can be removed later --------
          • Hashtable - Save Handle Of(Last created special effect) as Saw_Creation of (Key (Last created unit)) in Magnetic_Saw_Hash
          • -------- Increases the number so the hashtable numbers do not collide --------
          • Set Saw_Creation = (Saw_Creation + 1)
          • -------- Calculates the angles needed for the saws --------
          • Set Circle = (Circle + (360.00 / (Real(Config[5]))))
      • -------- Turns on the loop trigger --------
      • Trigger - Turn on Magnetism and saw damage <gen>
  • Magnetism and saw damage
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Selects the saws/turns off the trigger when no saws exist --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Saws is empty) Equal to True
        • Then - Actions
          • -------- Turns off the trigger --------
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • -------- Selects all the saws --------
          • Unit Group - Pick every unit in Saws 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 False
                • Then - Actions
                  • -------- When the saw is dead this removes the saws --------
                  • -------- Sets the number to the same as the one seen in Casting --------
                  • Set Saw_Creation = 22
                  • -------- Removes the corresponding sfx --------
                  • For each (Integer Debug) from 1 to Config[5], do (Actions)
                    • Loop - Actions
                      • -------- Destroys the SFX --------
                      • Special Effect - Destroy (Load Saw_Creation of (Key (Picked unit)) in Magnetic_Saw_Hash)
                      • -------- Increases the variable by 1 --------
                      • Set Saw_Creation = (Saw_Creation + 1)
                • Else - Actions
                  • -------- Sets the location of the Saw --------
                  • Set Temp_Point[1] = (Position of (Picked unit))
                  • -------- Sets the Saw as a variable so it can be referred to in another unit group --------
                  • Set Temp_Unit = (Picked unit)
                  • -------- Saves the unit in a hash referance --------
                  • Hashtable - Save Handle Of(Picked unit) as (Key Temp_Unit) of (Key Temp_Unit) in Magnetic_Saw_Hash
                  • -------- Picks nearby units which can be attracted by the saw --------
                  • Set Temp_Group[2] = (Units within (Real((Load 12 of (Key (Picked unit)) from Magnetic_Saw_Hash))) of Temp_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A flying unit) Equal to False)
                  • -------- Removes leaks --------
                  • Custom script: call RemoveLocation (udg_Temp_Point[1])
                  • -------- Picks all the units specified --------
                  • Unit Group - Pick every unit in Temp_Group[2] and do (Actions)
                    • Loop - Actions
                      • -------- Adds the unit to the magnetised group --------
                      • Unit Group - Add (Picked unit) to Magnetised_Group
                      • -------- Links the picked unit to the corresponding saw --------
                      • Hashtable - Save Handle Of(Load (Key Temp_Unit) of (Key Temp_Unit) in Magnetic_Saw_Hash) as 10 of (Key (Picked unit)) in Magnetic_Saw_Hash
                      • -------- Sets the location of the picked unit --------
                      • Set Temp_Point[1] = (Position of (Picked unit))
                      • -------- Sets the location of the saw --------
                      • Set Temp_Point[2] = (Position of (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash))
                      • -------- Calculates the distance between the saw and unit --------
                      • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
                      • -------- Creates the Magnetising sfx --------
                      • Lightning - Create a Drain Life lightning effect from source Temp_Point[1] to target Temp_Point[2]
                      • -------- Saves the lightning effect so it can be removed later --------
                      • Hashtable - Save Handle Of(Last created lightning effect) as 14 of (Key (Picked unit)) in Magnetic_Saw_Hash
                      • -------- Removes leaks --------
                      • Custom script: call RemoveLocation (udg_Temp_Point[1])
                      • -------- Removes leaks --------
                      • Custom script: call RemoveLocation (udg_Temp_Point[2])
                  • -------- Sets the variable to no unit as no unit is the 'matching unit' --------
                  • Set Temp_Unit = (Matching unit)
                  • -------- Destroys the temporary group --------
                  • Custom script: call DestroyGroup (udg_Temp_Group[2])
      • -------- Destroys the temporary group --------
      • Custom script: call DestroyGroup (udg_Temp_Group[1])
      • -------- Picks all the magnetised units --------
      • Unit Group - Pick every unit in Magnetised_Group and do (Actions)
        • Loop - Actions
          • -------- Checks the distance between the unit and the corresponding saw --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 1 of (Key (Picked unit)) from Magnetic_Saw_Hash) Less than 150
            • Then - Actions
              • -------- Destroys the old magnetising sfx --------
              • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
              • -------- Damages the unit --------
              • Unit - Cause (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash) to damage (Picked unit), dealing (Real((Load 13 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from (Magnetic_Saw_Hash)))) damage of attack type Spells and damage type Normal
              • -------- Sets the location of the unit --------
              • Set Temp_Point[1] = (Position of (Picked unit))
              • -------- Sets the location of the saw --------
              • Set Temp_Point[2] = (Position of (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash))
              • -------- Saves the distance between the points --------
              • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
              • -------- Creates new magnetising sfx --------
              • Lightning - Create a Drain Life lightning effect from source Temp_Point[1] to target Temp_Point[2]
              • -------- Saves the new Magnetising sfx --------
              • Hashtable - Save Handle Of(Last created lightning effect) as 14 of (Key (Picked unit)) in Magnetic_Saw_Hash
              • -------- Creates the damage Sfx --------
              • Special Effect - Create a special effect at Temp_Point[1] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • -------- Destroys the damage Sfx --------
              • Special Effect - Destroy (Last created special effect)
              • -------- Removes leaks --------
              • Custom script: call RemoveLocation (udg_Temp_Point[1])
              • -------- Removes leaks --------
              • Custom script: call RemoveLocation (udg_Temp_Point[2])
            • Else - Actions
              • -------- Destroys the old Magnetism Sfx --------
              • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
              • -------- Sets the location of the unit --------
              • Set Temp_Point[1] = (Position of (Picked unit))
              • -------- Sets the location of the saw --------
              • Set Temp_Point[2] = (Position of (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash))
              • -------- Saves the distance between the points --------
              • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
              • -------- Caculates the angle (direction) --------
              • Set Angle = (Angle from Temp_Point[1] to Temp_Point[2])
              • -------- Caculates the magnetism speed --------
              • Set Speed = (Load 11 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from Magnetic_Saw_Hash)
              • -------- Changes the units X --------
              • Custom script: call SetUnitX(GetEnumUnit(), GetUnitX(GetEnumUnit()) + udg_Speed * Cos(udg_Angle * bj_DEGTORAD) )
              • -------- Changes the units Y --------
              • Custom script: call SetUnitY(GetEnumUnit(), GetUnitY(GetEnumUnit()) + udg_Speed * Sin(udg_Angle * bj_DEGTORAD) )
              • -------- Creates new magnetising sfx --------
              • Lightning - Create a Drain Life lightning effect from source Temp_Point[1] to target Temp_Point[2]
              • -------- Saves the new Magnetising sfx --------
              • Hashtable - Save Handle Of(Last created lightning effect) as 14 of (Key (Picked unit)) in Magnetic_Saw_Hash
              • -------- Removes leaks --------
              • Custom script: call RemoveLocation (udg_Temp_Point[1])
              • -------- Moves the unit --------
              • -------- Removes leaks --------
              • Custom script: call RemoveLocation (udg_Temp_Point[2])
              • -------- Removes leaks --------
              • Custom script: call RemoveLocation (udg_Temp_Point[3])
          • -------- Saw dies --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash) is dead) Equal to True
            • Then - Actions
              • -------- Removes the old magnetism Sfx --------
              • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
              • -------- Removes the units from the magnetised group --------
              • Unit Group - Remove (Picked unit) from Magnetised_Group
              • -------- Seperates the unit from the saw --------
              • Hashtable - Save Handle OfNo unit as 10 of (Key (Picked unit)) in Magnetic_Saw_Hash
            • Else - Actions
          • -------- Unit dies --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to True
            • Then - Actions
              • -------- Removes the old magnetism sfx --------
              • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
              • -------- Removes the unit from the magnetised group --------
              • Unit Group - Remove (Picked unit) from Magnetised_Group
              • -------- Sets the location of the unit --------
              • Set Temp_Point[1] = (Position of (Picked unit))
              • -------- Creates death Sfx --------
              • Special Effect - Create a special effect at Temp_Point[1] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • -------- Destroyes the death sfx --------
              • Special Effect - Destroy (Last created special effect)
              • -------- Seperates the unit from the saw --------
              • Hashtable - Save Handle OfNo unit as 10 of (Key (Picked unit)) in Magnetic_Saw_Hash
              • -------- Removes leaks --------
              • Custom script: call RemoveLocation (udg_Temp_Point[1])
            • Else - Actions


Enjoy, Give credits and inform me of any bugs/problems.


v1.063:
- Changed a line Kam pointed out, to what Kam pointed out it should be
v1.062:
A test map improvement update
- Improved the terrain a great deal, aswell as added additional doodads (in the form of trees) to make sheep hearding harder
- Removed Potential leaks from regions
- Compressed map-specific triggers
V1.061:
- Small bugfix - units can no longer be pulled onto inexcapable terrain.
- The outside of map glitch has been fixed (Units being pulled out the map area)
- fixed a visual glitch with the trap when being cast outside the map
V1.06:
- After much deliberation I finnaly decided to add co-ordinates so units can try and run, the downside to this is now the trap needs more magnetism to be effective (most units are 'strong' enough to run away from level 1 & 2 (standard)
- Added one more example use
V1.05:
- After drinking alot of tea to make me hyper I managed to type the documentation in
V1.01:
- Cleaned it up a bit.
- Turned the loop trigger off when not in use
V1.00:
- Initial upload


Keywords:
Trap, Saw, Disembowelment, Slice, Magnetic, Magnet, Metal, Slice & Dice, Chainsaw, Pull, Magnetism.
Contents

Magnetic Saw Trap (Map)

Reviews
18:54, 12th May 2010 The_Reborn_Devil: The triggering looks good and the effects are neat. Status: Approved Rating: Recommended

Moderator

M

Moderator

18:54, 12th May 2010
The_Reborn_Devil:

The triggering looks good and the effects are neat.


Status: Approved
Rating: Recommended
 
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Load 1 of (Key (Picked unit)) from Magnetic_Saw_Hash) Less than 150
    • Then - Actions
      • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
      • Unit - Cause (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash) to damage (Picked unit), dealing (Real((Load 13 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from (Last created hashtable)))) damage of attack type Spells and damage type Normal
      • Set Temp_Point[1] = (Position of (Picked unit))
      • Set Temp_Point[2] = (Position of (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash))
      • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Lightning - Create a Drain Life lightning effect from source Temp_Point[1] to target Temp_Point[2]
      • Hashtable - Save Handle Of(Last created lightning effect) as 14 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Special Effect - Create a special effect at Temp_Point[1] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_Temp_Point[1])
      • Custom script: call RemoveLocation (udg_Temp_Point[2])
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • (Load 1 of (Key (Picked unit)) from Magnetic_Saw_Hash) Greater than or equal to 150
      • Then - Actions
        • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
        • Set Temp_Point[1] = (Position of (Picked unit))
        • Set Temp_Point[2] = (Position of (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash))
        • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
        • Hashtable - Save (Angle from Temp_Point[1] to Temp_Point[2]) as 2 of (Key (Picked unit)) in Magnetic_Saw_Hash
        • Set Temp_Point[3] = (Temp_Point[1] offset by (Real((Load 11 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from Magnetic_Saw_Hash))) towards (Load 2 of (Key (Picked unit)) from Magnetic_Saw_Hash) degrees)
        • Lightning - Create a Drain Life lightning effect from source Temp_Point[1] to target Temp_Point[2]
        • Hashtable - Save Handle Of(Last created lightning effect) as 14 of (Key (Picked unit)) in Magnetic_Saw_Hash
        • Custom script: call RemoveLocation (udg_Temp_Point[1])
        • Unit - Move (Picked unit) instantly to Temp_Point[3]
        • Set Temp_Point[1] = (Position of (Picked unit))
        • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
        • Custom script: call RemoveLocation (udg_Temp_Point[1])
        • Custom script: call RemoveLocation (udg_Temp_Point[2])
        • Custom script: call RemoveLocation (udg_Temp_Point[3])
      • Else - Actions
That could be
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Load 1 of (Key (Picked unit)) from Magnetic_Saw_Hash) Less than 150
    • Then - Actions
      • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
      • Unit - Cause (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash) to damage (Picked unit), dealing (Real((Load 13 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from (Last created hashtable)))) damage of attack type Spells and damage type Normal
      • Set Temp_Point[1] = (Position of (Picked unit))
      • Set Temp_Point[2] = (Position of (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash))
      • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Lightning - Create a Drain Life lightning effect from source Temp_Point[1] to target Temp_Point[2]
      • Hashtable - Save Handle Of(Last created lightning effect) as 14 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Special Effect - Create a special effect at Temp_Point[1] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_Temp_Point[1])
      • Custom script: call RemoveLocation (udg_Temp_Point[2])
    • Else - Actions
      • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
      • Set Temp_Point[1] = (Position of (Picked unit))
      • Set Temp_Point[2] = (Position of (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash))
      • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Hashtable - Save (Angle from Temp_Point[1] to Temp_Point[2]) as 2 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Set Temp_Point[3] = (Temp_Point[1] offset by (Real((Load 11 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from Magnetic_Saw_Hash))) towards (Load 2 of (Key (Picked unit)) from Magnetic_Saw_Hash) degrees)
      • Lightning - Create a Drain Life lightning effect from source Temp_Point[1] to target Temp_Point[2]
      • Hashtable - Save Handle Of(Last created lightning effect) as 14 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Custom script: call RemoveLocation (udg_Temp_Point[1])
      • Unit - Move (Picked unit) instantly to Temp_Point[3]
      • Set Temp_Point[1] = (Position of (Picked unit))
      • Hashtable - Save (Integer((Distance between Temp_Point[1] and Temp_Point[2]))) as 1 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Custom script: call RemoveLocation (udg_Temp_Point[1])
      • Custom script: call RemoveLocation (udg_Temp_Point[2])
      • Custom script: call RemoveLocation (udg_Temp_Point[3])

You also need a Unit Group to add your dummy and turn on a trigger manually, than have a trigger running eternally every 0.03 seconds:
  • Casting
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Magnetic saw trap
  • Actions
    • Set Temp_Point[1] = (Target point of ability being cast)
    • Special Effect - Create a special effect at Temp_Point[1] using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
    • Special Effect - Destroy (Last created special effect)
    • Unit - Create 1 Magnetic Saw Trap for (Owner of (Triggering unit)) at Temp_Point[1] facing Default building facing degrees
    • Unit - Add a ((Real(Config[4])) x (Real((Level of Magnetic saw trap for (Triggering unit))))) second Generic expiration timer to (Last created unit)
    • Unit Group - Add (Last created unit) to SawTrapGroup //This line is new
    • Custom script: call RemoveLocation (udg_Temp_Point[1])
    • //Rest actions here
    • Trigger - Turn on Magnetism and saw damage <gen> //This line is new
  • Magnetism and saw damage
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (SawTrapGroup is empty) Equal to True
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
        • Unit Group - Pick every unit in (SawTrapGroup) and do (Actions)
          • Loop - Actions
            • //Actions here
What is more, do not use Point indexes on different triggers. For example, you used Point[1] in the first trigger. Don't use [1] again in another trigger. Go on with [2], [3], ..., and so on.

  • Skip remaining actions
Not necessary, if you use do it the way I told you with Turn on/off Trigger.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Picked unit) is dead) Equal to True
    • Then - Actions
      • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
      • Unit Group - Remove (Picked unit) from Magnetised_Group
      • Set Temp_Point[1] = (Position of (Picked unit))
      • Special Effect - Create a special effect at Temp_Point[1] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Hashtable - Save Handle OfNo unit as 10 of (Key (Picked unit)) in Magnetic_Saw_Hash
      • Custom script: call RemoveLocation (udg_Temp_Point[1])
    • Else - Actions
Could be:
  • Death
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) is in SawTrapGroup) Equal to True
  • Actions
    • Unit Group - Remove (Triggering unit) from SawTrapGroup
    • Lightning - Destroy (Load 14 of (Key (Picked unit)) in Magnetic_Saw_Hash)
    • Unit Group - Remove (Picked unit) from Magnetised_Group
    • Set Temp_Point[1] = (Position of (Picked unit))
    • Special Effect - Create a special effect at Temp_Point[1] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
    • Special Effect - Destroy (Last created special effect)
    • Hashtable - Save Handle OfNo unit as 10 of (Key (Picked unit)) in Magnetic_Saw_Hash
    • Custom script: call RemoveLocation (udg_Temp_Point[1])
 
Level 16
Joined
Jul 4, 2008
Messages
1,106
The spell is dull as shit.
The unit's have no opportunity of running away, but that is because you are using
  • Unit - Move (unit) instantly to point
when you COULD be using coordinates
  • Custom script: set udg_X = GetUnitX(udg_unit)
  • Custom script: set udg_Y = GetUnitY(udg_unit)
  • Custom script: call SetUnitX(udg_unit,udg_X + udg_speed * cos(udg_AngleBtwPoints * bj_DEGTORAD))
  • Custom script: call SetUnitY(udg_unit,udg_Y + udg_speed * sin(udg_AngleBtwPoints * bj_DEGTORAD))
It may be longer, but it hell is better.
 
Last edited:
@Klingo hmm, I'll look into it right away.

Edit:Fixed and ready upon next update

@Offgraphic Units aren't SUPPOSED to be able to get away, it's meant to be like the magnetic saw in RA3 inwhich you cannot escape the saw, also you don't have to be rude about it. :p

Edit: If it's oh so neccercary then I may consider it, but I would prefer to keep it to as similar as to the RA3 game were I got the idea from.
 
Level 16
Joined
Jul 4, 2008
Messages
1,106
You know, waiting like 10 seconds first for the units to get to the saws, and then they just stand there doing nothing, except taking damage of imaginary saws.

This isn't really a good thing.

A possibility for the units to run away WOULD be a cool idea.

Last comment: This spell is at this moment, Dull as shit.

PS: Red alert 3 was a fail anyways... So was the fourth one also.
 
You know, waiting like 10 seconds first for the units to get to the saws, and then they just stand there doing nothing, except taking damage of imaginary saws.

This isn't really a good thing.

A possibility for the units to run away WOULD be a cool idea.

Last comment: This spell is at this moment, Dull as shit.

PS: Red alert 3 was a fail anyways... So was the fourth one also.

A. You can change how magnetic the saws are, changing how long it takes to pull units in and 10 seconds is a huge exagguration.

B. Units can destroy the saws to break themselves free, I just made it so they didn't in the test map cos you had no units to really distract them with.
Also, They don't 'just stand there' as such, they would attempt to destroy the saw and if range would continue to fire at their target

C. You do not need to swear at everything, a much more polite manner would be much prefered by most.

D. You say it's a fail, but no need to publicise your opinion, you make it sound as if theres no debate about it, so keep it to yourself.

E. Now, before you go onto 'ranged unit should be able to attack while they are being pulled' and what not that I would expect from one such as you, this is a recreation of a RA3 spell, just modified to be an AOE trap, units grab by the saw cannot move, attack or do anything of the sort.

Edit: Just uploaded the version were the bug was fixed, not really big enough to be considered a new 'version' as such.
 
Level 16
Joined
Jul 4, 2008
Messages
1,106
To be correct, I've not sweared at everything. If you mean shit, that's not actually swearing, because Shit is just another way to say Crap.

I'm testing now the new test map, if there is any changes made.

Well, not quite better.
I still dislike that units are not free to move anywhere.

How could you improve it:
Well, fasten the testmap's magnetic power or whatever is the drag power.
And also, if you could, give the units a possibility to run away normally ([rainbow][confirm="Examble code:
Custom script: set X = GetUnitX(trap)
Custom script: set Y = GetUnitY(trap)
Custom script: set XY = Location(X,Y)
Custom script: set X2 = GetUnitX(target)
Custom script: set Y2 = GetUnitX(target)
Custom script: set X2Y2 = Location(X2,Y2)
Custom script: set AngleBtwPoints = AngleBetweenPoints(XY,X2Y2)
Custom script: set Power = GetUnitMoveSpeed(trap) / 75
Custom script: SetUnitX(trap,X + Power * Cos ( AngleBtwPoints * bj_DEGTORAD ) )
Custom script: SetUnitY(trap,Y + Power * Sin ( AngleBtwPoints * bj_DEGTORAD ) )
Custom script: call RemoveLocation(XY)
Custom script: call RemoveLocation(X2Y2)

ENDLINE
"]Examble Code Here, Press[/confirm][/rainbow]
)

Current Rating: 2½/5 ( 3/5 )
 
Level 11
Joined
Jan 25, 2009
Messages
572
Instead of Integer A. Use a Integer Variable. That's what i've learned from Pharaoh_ i think :p Otherwise, if someone uses 2 spells with integer A and the spells will be casted at the same time, the Integer A variable will raise 200% faster than normal.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

== My personal vote: NO! approval [3/5] ==
(Read the full review to understand this ration)

> Hive Workshop uploading:
1) Name of the spell is ok with name and version [5/5]
2) Name of the spell-map is ok, but doesn't include the version [4/5]
3) Most key words are ok, but there are some, that are no needed like "Unorthodox", "Aggrovating" [3,5/5]
4) You have a good description, with the triggers and a changelog [5/5]

> The Spell " Magnetic Saw Trap":
1) As far I can see it, the spell is MPI + MUI [5/5]
2) Under certain conditions, the enemies can be dragged over not path able terrain like cliffs [2/5]
bokunuwd1ajq8jo7v.jpg

3) The targets can be dragged through trees and destructible and can bug then. You should add, that trees and destructible are destroyed around the trap and around the dragged targets. [0/5]
bokur1sasam2vrpln.jpg

4) If I create spell out of the map, the "wisp" is ported to the map, but the missiles stay out of the map, you should think about it. [3,5/5]
bokvwk2nfajjoyb8b.jpg

5) The idea of the spell is very good, can be used in map, can be used as normal traps and as a cast able spell [5/5]

> Optional - The test map:
1) I like the idea with the test map. Here you can see, what the spell can do. [5/5]
2) Terrain + Doodads: Very simple, but very good for testing the spell in many situations [4,5/5]
3) You map requires a lot of triggers, but they have leaks and you can reduce the number of triggers with combination [2,5/5] like:
  • Trig
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -revive
        • Then - Actions
          • -------- actions --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to -level up
            • Then - Actions
              • -------- actions --------
            • Else - Actions
== Ok what we got at the end ==
Necessary points:
Hive upload: 5 + 4 + 3.5 + 3.5 + 5 = [21/25]
Spell: 5 + 2 + 0 + 5 = [12/20]
At all [33/45] ~73.33% of 100%.

Optional points:
5 + 4.5 + 2.5 = [12/15] ~ 80.00% of 100%

Within calculate the bugs of the doodads, trees and cliffs + the optional leaks and improvements I would give 1/5, but the map stuff is optional and the spell idea is good and can be very useful I think for now 3/5 is ok. When you fix those necessary bugs I will give 4/5 and then it's approval.

NOTE: My review is NOTHING against the creator of the spell and NOTHING against the spell at all. But it needs some fixes, else you can bug it and in this case, I don't know why this get an approval, if this isn't tested under more conditions and still has some mistakes in it!!

Greetings and Peace
Dr. Boom
 
huh how ironic, the bugs are only caused because of using co-ordinates (as offgraphic so heavily demanded, whom gave the same rating, give me a few seconds and I'll fix that, not hard to do at all.

Edit: Small triggering oversite, fixed now, units won't be pulled out of the map, trapped in objects, etc.

Edit2: As far as I was aware, there was some debate on wether or not regions leak, so I'll search for some solid confirmation.

Edit3: I don't see the relavance of triggers which are not included with the spell, or as it were, why they matter.
 
Last edited:
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

I'm very sorry that I don't have time only for you and I also changed my rating to 4/5, but anyway to the spell:

- I'm still able to drag the enemy units through trees, so the unit stands in the trees.
- I'm still able to drag the unit out of the map. Only a little, but it is out of the map, so it can't be dragged in again.
- Also it seems to be that you make a wrong check if the terrain is pathable around the dragged unit, because I can't drag this unit:
bpdfejaux975jq3vp.gif

- I notice also, that there must be some bug with the damage, sometimes the unit gets much damage, sometimes low damage and sometimes no damage as you can see here:
bpdfkp3icde66askl.gif


All in all it's ok then, but there are still some bugs you need to fix.

Greetings and Peace
Dr. Boom
 
Well from what I can say I tried to re-create the bugs:

- I cannot pull a unit out of the map to the extent of being stuck outside, it just walks back in afterward (I used a sheep to test this)
- There is only 1 possible collision test, if it didn't work, it's cos you placed the archmage into a normally inaccessible area (again I couldn't re-create this bug)
-The units can be dragged through trees, but not to the extend of being stuck within (I tested this with sheep, walked right back out again)
- as far as damage, thats cos the unit is running away from the saw and is 'just' out of range of it, so some of the damage isn't applied since on every so often on the 0.03's it is out of range.

I'll look into it, but I dunno how you're finding these things.
 
You need to add a variable for maximum units pulled.

Edit: Also this line:

  • Unit - Cause (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash) to damage (Picked unit), dealing (Real((Load 13 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from (Last created hashtable)))) damage of attack type Spells and damage type Normal
should read:

  • Unit - Cause (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash) to damage (Picked unit), dealing (Real((Load 13 of (Key (Load 10 of (Key (Picked unit)) in Magnetic_Saw_Hash)) from Magnetic_Saw_Hash))) damage of attack type Spells and damage type Normal
 
Last edited:
Top