Death Grip v1.02(final)

This bundle is marked as approved. It works and satisfies the submission rules.
okay so, i completely redid the triggering of the spells using hashtables; Death Grip pulls a targeted unit towards the caster and deals damage for each second the target is pulled. spell is mui, and leakless, Spell was designed by me alone; Codes bellow:


  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Hashtable = (Last created hashtable)
  • Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Death Grip
    • Actions
      • Set Position = (Position of (Triggering unit))
      • Set Position2 = (Position of (Target unit of ability being cast))
      • Set Angle = ((Angle from Position to Position2) + 180.00)
      • Set Distance = 10.00
      • Set RemainingTime = ((Distance between Position and Position2) - 100.00)
      • Set Caster = (Triggering unit)
      • Hashtable - Save Handle Of(Target unit of ability being cast) as (Key target) of (Key (Triggering unit)) in Hashtable
      • Hashtable - Save Distance as (Key distance) of (Key (Target unit of ability being cast)) in Hashtable
      • Hashtable - Save RemainingTime as (Key time) of (Key (Target unit of ability being cast)) in Hashtable
      • Hashtable - Save Angle as (Key angle) of (Key (Target unit of ability being cast)) in Hashtable
      • Hashtable - Save Handle OfCaster as (Key caster) of (Key (Target unit of ability being cast)) in Hashtable
      • Unit Group - Add (Target unit of ability being cast) to UnitGroup
      • Unit - Turn collision for (Target unit of ability being cast) Off
      • Custom script: call RemoveLocation(udg_Position)
      • Custom script: call RemoveLocation(udg_Position2)
      • Trigger - Turn on Loop <gen>
  • Loop
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in UnitGroup) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in UnitGroup and do (Actions)
            • Loop - Actions
              • Set Distance = (Load (Key distance) of (Key (Picked unit)) from Hashtable)
              • Set Angle = (Load (Key angle) of (Key (Picked unit)) from Hashtable)
              • Set RemainingTime = (Load (Key time) of (Key (Picked unit)) from Hashtable)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RemainingTime Greater than 0.00
                • Then - Actions
                  • Set Position = (Position of (Picked unit))
                  • Set Position2 = (Position offset by (Load (Key distance) of (Key (Picked unit)) from Hashtable) towards (Load (Key angle) of (Key (Picked unit)) from Hashtable) degrees)
                  • Unit - Move (Picked unit) instantly to Position2
                  • Hashtable - Save (RemainingTime - 10.00) as (Key time) of (Key (Picked unit)) in Hashtable
                  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_Position)
                  • Custom script: call RemoveLocation(udg_Position2)
                • Else - Actions
                  • Unit - Turn collision for (Picked unit) On
                  • Unit - Pause (Load (Key caster) of (Key (Picked unit)) in Hashtable)
                  • Unit - Unpause (Load (Key caster) of (Key (Picked unit)) in Hashtable)
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
                  • Unit Group - Remove (Picked unit) from UnitGroup
        • Else - Actions
          • Trigger - Turn off (This trigger)
Note: The trigger above is initially off.
  • Stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Turn collision for (Load (Key target) of (Key (Triggering unit)) in Hashtable) On
          • Unit Group - Remove (Load (Key target) of (Key (Triggering unit)) in Hashtable) from UnitGroup



post your thoughts :) spell is GUI MUI and bugless/leakless.
please rate (i know it's simple but rate anyhow=D)



Keywords:
Hashtables,World of Warcraft, Death Knight, Triggers, pull, MUI,GUI.
Contents

Just another Warcraft III map (Map)

Reviews
17:01, 6th Feb 2010 The_Reborn_Devil: The triggering looks ok, but you forgot to clear the hashtable for the caster. Should be in the trigger "Stop". Status: Approved Rating: Useful Please fix that hashtable thing though. Have a nice day!

Moderator

M

Moderator

17:01, 6th Feb 2010
The_Reborn_Devil:
The triggering looks ok, but you forgot to clear the hashtable for the caster. Should be in the trigger "Stop".

Status: Approved
Rating: Useful

Please fix that hashtable thing though. Have a nice day!
 
Level 18
Joined
Feb 4, 2009
Messages
1,315
why do you pause and then unpause the target?

points of improvement:
rename the hastable to something like DeathGrip_Hashtable
same goes for the unit group
you save the angle and then you don't use it but load it again o_O
it's not remaining time but remaining distance and it does not have to be decreased by 10 buy by the speed
using hashtables for this is a bad method since indexing would be much faster and hashtables aren't needed but if you don't know how to do it this is fine too.....
using SetUnitX and SetUnitY would be even faster and you would not need to turn the collision off but explaining this would take to long since I have to go to school in 10 minutes and right now I am sitting around here in underwear :D
probably in 8 hours :p
 
Level 3
Joined
Dec 17, 2009
Messages
15
why do you pause and then unpause the target?

points of improvement:
rename the hastable to something like DeathGrip_Hashtable
same goes for the unit group
you save the angle and then you don't use it but load it again o_O
it's not remaining time but remaining distance and it does not have to be decreased by 10 buy by the speed
using hashtables for this is a bad method since indexing would be much faster and hashtables aren't needed but if you don't know how to do it this is fine too.....
using SetUnitX and SetUnitY would be even faster and you would not need to turn the collision off but explaining this would take to long since I have to go to school in 10 minutes and right now I am sitting around here in underwear :D
probably in 8 hours :p

I was told by another member to use hashtables; and in my opinnion hashtables are easier than index's, and i paus/unpause the caster so he stops casting the ability as it's based off of aerial shackles :p
 
Level 3
Joined
Jan 9, 2010
Messages
34
You got to speed it up



Distance 20
RemainingTime = ((blablablabla) - 250)

Everything else should just remain unchanged. That should change the movement speed and the target unit's ending position accordingly.
 
Top