1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  5. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Death Grip v1.02(final)

Submitted by xXSoraXx
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:

Spell Code

  • 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
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!
  1. 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!
     
  2. Klingo

    Klingo

    Joined:
    Dec 19, 2009
    Messages:
    246
    Resources:
    5
    Spells:
    5
    Resources:
    5
    Stop deleting your spell then reupload , use update.
     
  3. xXSoraXx

    xXSoraXx

    Joined:
    Dec 17, 2009
    Messages:
    10
    Resources:
    2
    Spells:
    2
    Resources:
    2
    i was concidering abandoning it, so i deleted it but i changed my mind
     
  4. D4RK_G4ND4LF

    D4RK_G4ND4LF

    Joined:
    Feb 4, 2009
    Messages:
    1,196
    Resources:
    20
    Models:
    3
    Spells:
    15
    Tutorials:
    2
    Resources:
    20
    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
     
  5. xXSoraXx

    xXSoraXx

    Joined:
    Dec 17, 2009
    Messages:
    10
    Resources:
    2
    Spells:
    2
    Resources:
    2
    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
     
  6. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    You don't clear hashtable for triggering unit. Clear the hashtable also when the unit stops casting the ability.

    You don't need to check whether the unit group is empty or not during every loop. Only after a unit is removed from it..
     
  7. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Indexing can be faster than hashtables if used properly, else it isn't.

    Anyway hashtables are fine, so you shouldn't argue about such trivial things.
     
  8. NaRuTo

    NaRuTo

    Joined:
    May 28, 2009
    Messages:
    9
    Resources:
    0
    Resources:
    0
    norm...
     
  9. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,765
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
    Use channel.
     
  10. xXSoraXx

    xXSoraXx

    Joined:
    Dec 17, 2009
    Messages:
    10
    Resources:
    2
    Spells:
    2
    Resources:
    2
    i used aerial shackles so i wouldnt have to add to the trigger to deal the damage per second.
     
  11. xXSoraXx

    xXSoraXx

    Joined:
    Dec 17, 2009
    Messages:
    10
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Define faster please?
     
  12. Klingo

    Klingo

    Joined:
    Dec 19, 2009
    Messages:
    246
    Resources:
    5
    Spells:
    5
    Resources:
    5
    Well i think hashtable is harder than index.
     
  13. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Faster for processing.
     
  14. xXSoraXx

    xXSoraXx

    Joined:
    Dec 17, 2009
    Messages:
    10
    Resources:
    2
    Spells:
    2
    Resources:
    2
    i see... thank you
     
  15. backagain

    backagain

    Joined:
    Jan 19, 2010
    Messages:
    1
    Resources:
    0
    Resources:
    0
    You got to speed it up
     
  16. bLu3_eYeS

    bLu3_eYeS

    Joined:
    Jan 9, 2010
    Messages:
    97
    Resources:
    0
    Resources:
    0
    A bit buggy...
     
  17. Quehn

    Quehn

    Joined:
    Jan 9, 2010
    Messages:
    34
    Resources:
    0
    Resources:
    0
    [​IMG]

    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.
     
  18. Chenzi420666

    Chenzi420666

    Joined:
    Dec 15, 2011
    Messages:
    106
    Resources:
    0
    Resources:
    0
    i just saw this looks really cool but is there any easier way to remake this? im new to triggering and dont know how to do variables and hashtables (maybe even more stuff i dont know)
     
  19. Filmting

    Filmting

    Joined:
    Feb 20, 2013
    Messages:
    227
    Resources:
    38
    Packs:
    2
    Maps:
    35
    Tutorials:
    1
    Resources:
    38
    This is excatly what i was looking for! I love how simple it is.
    Edit: nvm dident see page 2 of how to change speed.