1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  3. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  4. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    Dismiss Notice

Power Hook v1.3

Submitted by calex3
This bundle is marked as approved. It works and satisfies the submission rules.
Power Hook
[​IMG] Active/Target Point:
Trows a giant electric chain which grabs nearby unit damaging it and pulling it over to your hero. 100 damage per level, distance 450 + 150 per level.
Manacost: 160/170/180/190
Cooldown: 15/13/11/10 seconds

Trigger 1
  • Hook
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Power Hook
    • Actions
      • -------- ----------------------- --------
      • -------- Index System --------
      • -------- ----------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PH_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Hook Loop <gen>
        • Else - Actions
      • Set PH_Index[1] = (PH_Index[1] + 1)
      • Set PH_Index[2] = (PH_Index[2] + 1)
      • -------- ----------------------- --------
      • -------- Spell Settings --------
      • -------- ----------------------- --------
      • Set PH_Counter[PH_Index[2]] = 0
      • -------- ----------------------- --------
      • -------- Points for angle --------
      • Set PH_Cast_Point = (Position of (Triggering unit))
      • Set PH_Target_Point = (Target point of ability being cast)
      • -------- ----------------------- --------
      • -------- Caster --------
      • Set PH_Caster[PH_Index[2]] = (Triggering unit)
      • Unit - Pause PH_Caster[PH_Index[2]]
      • Unit - Add Invulnerable (Neutral) to PH_Caster[PH_Index[2]]
      • -------- ----------------------- --------
      • -------- Angle for hook --------
      • Set PH_Hook_Angle[PH_Index[2]] = (Angle from PH_Cast_Point to PH_Target_Point)
      • -------- ----------------------- --------
      • -------- Hook (Dummy) --------
      • Set PH_Near_Point = (PH_Cast_Point offset by 100.00 towards PH_Hook_Angle[PH_Index[2]] degrees)
      • Unit - Create 1 Hook for (Owner of PH_Caster[PH_Index[2]]) at PH_Near_Point facing Default building facing degrees
      • Set PH_Dummy[PH_Index[2]] = (Last created unit)
      • -------- ----------------------- --------
      • -------- Things needed for spell to work fine --------
      • Set PH_Hooked_Is[PH_Index[2]] = False
      • Set PH_Hooked_Unit[PH_Index[2]] = No unit
      • Set PH_Effects[PH_Index[2]] = (Units of type Hook)
      • -------- ----------------------- --------
      • -------- Removing leaks --------
      • Custom script: call RemoveLocation(udg_PH_Near_Point)
      • Custom script: call RemoveLocation(udg_PH_Cast_Point)
      • Custom script: call RemoveLocation(udg_PH_Target_Point)
      • -------- ----------------------- --------
      • -------- Adjustable settings --------
      • -------- ----------------------- --------
      • -------- Damage and Hook Distance --------
      • Set PH_Damage = (100 x (Level of (Ability being cast) for PH_Caster[PH_Index[2]]))
      • Set PH_Distance = (15 + (5 x (Level of (Ability being cast) for PH_Caster[PH_Index[2]])))
      • -------- ----------------------- --------
      • -------- ----------------------- --------

Trigger 2
  • Hook Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer PH_Index[3]) from 1 to PH_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PH_Counter[PH_Index[3]] Less than PH_Distance
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PH_Hooked_Is[PH_Index[3]] Equal to False
                • Then - Actions
                  • -------- ----------------------- --------
                  • -------- Moving hook and creating effects --------
                  • -------- ----------------------- --------
                  • -------- Counter incrasing --------
                  • Set PH_Counter[PH_Index[3]] = (PH_Counter[PH_Index[3]] + 1)
                  • -------- ----------------------- --------
                  • -------- Set Locations and move Hook dummy --------
                  • Set PH_Dummy_Point[PH_Index[3]] = (Position of PH_Dummy[PH_Index[3]])
                  • Set PH_Hook_Point[PH_Index[3]] = (PH_Dummy_Point[PH_Index[3]] offset by 30.00 towards PH_Hook_Angle[PH_Index[3]] degrees)
                  • -------- ----------------------- --------
                  • Unit - Move PH_Dummy[PH_Index[3]] instantly to PH_Hook_Point[PH_Index[3]]
                  • Unit - Create 1 Effect for (Owner of PH_Caster[PH_Index[3]]) at PH_Dummy_Point[PH_Index[3]] facing PH_Hook_Angle[PH_Index[3]] degrees
                  • Unit - Turn collision for (Last created unit) Off
                  • Unit Group - Add (Last created unit) to PH_Effects[PH_Index[3]]
                  • Hashtable - Save Handle Of(Last created unit) as PH_Counter[PH_Index[3]] of PH_Index[3] in PH_Table
                  • -------- ----------------------- --------
                  • -------- Hooking enemy unit --------
                  • -------- ----------------------- --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 64.00 of PH_Hook_Point[PH_Index[3]] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of PH_Caster[PH_Index[3]])) Equal to True))) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is Magic Immune) Equal to False
                          • PH_Hooked_Is[PH_Index[3]] Equal to False
                        • Then - Actions
                          • Set PH_Hooked_Unit[PH_Index[3]] = (Picked unit)
                          • Set PH_Hooked_Is[PH_Index[3]] = True
                          • Unit - Pause (Picked unit)
                          • Unit - Turn collision for (Picked unit) Off
                          • -------- ----------------------- --------
                          • -------- Deal damage --------
                          • Unit - Cause PH_Caster[PH_Index[3]] to damage (Picked unit), dealing (Real(PH_Damage)) damage of attack type Spells and damage type Lightning
                          • -------- ----------------------- --------
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_PH_Dummy_Point[udg_PH_Index[3]])
                  • Custom script: call RemoveLocation(udg_PH_Hook_Point[udg_PH_Index[3]])
                  • -------- Leaks Removed --------
                  • -------- ----------------------- --------
                  • -------- ----------------------- --------
                  • -------- No unit hooked? --------
                  • -------- ----------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PH_Counter[PH_Index[3]] Equal to PH_Distance
                    • Then - Actions
                      • Set PH_Hooked_Is[PH_Index[3]] = True
                      • Unit - Unpause PH_Caster[PH_Index[3]]
                    • Else - Actions
                  • -------- ----------------------- --------
                  • -------- ----------------------- --------
                  • -------- ----------------------- --------
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PH_Hooked_Is[PH_Index[3]] Equal to True
                • Then - Actions
                  • -------- ----------------------- --------
                  • -------- Moving Hook back --------
                  • -------- ----------------------- --------
                  • -------- Counter decrasing --------
                  • Set PH_Counter[PH_Index[3]] = (PH_Counter[PH_Index[3]] - 1)
                  • -------- ----------------------- --------
                  • -------- Setting locations to move Hook dummy and hooked unit --------
                  • Set PH_Dummy_Point[PH_Index[3]] = (Position of PH_Dummy[PH_Index[3]])
                  • Set PH_Hook_Point[PH_Index[3]] = (PH_Dummy_Point[PH_Index[3]] offset by 30.00 towards (PH_Hook_Angle[PH_Index[3]] - 180.00) degrees)
                  • -------- ----------------------- --------
                  • -------- Destroy effect of hook --------
                  • Set PH_Effect = (Load (PH_Counter[PH_Index[3]] + 1) of PH_Index[3] in PH_Table)
                  • Unit - Kill PH_Effect
                  • Unit - Remove PH_Effect from the game
                  • -------- ----------------------- --------
                  • -------- ----------------------- --------
                  • Unit - Move PH_Dummy[PH_Index[3]] instantly to PH_Hook_Point[PH_Index[3]]
                  • -------- ----------------------- --------
                  • -------- Moving hooked unit --------
                  • -------- ----------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PH_Hooked_Unit[PH_Index[3]] Not equal to No unit
                    • Then - Actions
                      • Unit - Move PH_Hooked_Unit[PH_Index[3]] instantly to PH_Dummy_Point[PH_Index[3]]
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_PH_Dummy_Point[udg_PH_Index[3]])
                  • Custom script: call RemoveLocation(udg_PH_Hook_Point[udg_PH_Index[3]])
                  • -------- ----------------------- --------
                  • -------- Leaks Removed --------
                  • -------- ----------------------- --------
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PH_Counter[PH_Index[3]] Equal to 0
                • Then - Actions
                  • -------- ----------------------- --------
                  • -------- Removing hook and unpause caster --------
                  • -------- ----------------------- --------
                  • Unit - Kill PH_Dummy[PH_Index[3]]
                  • Unit - Remove PH_Dummy[PH_Index[3]] from the game
                  • Unit - Unpause PH_Caster[PH_Index[3]]
                  • Animation - Reset PH_Caster[PH_Index[3]]'s animation
                  • Custom script: call DestroyGroup(udg_PH_Effects[udg_PH_Index[3]])
                  • -------- ----------------------- --------
                  • -------- Unpause Hooked unit --------
                  • -------- ----------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PH_Hooked_Unit[PH_Index[3]] Not equal to No unit
                    • Then - Actions
                      • Unit - Unpause PH_Hooked_Unit[PH_Index[3]]
                      • Unit - Turn collision for PH_Hooked_Unit[PH_Index[3]] On
                    • Else - Actions
                  • -------- ----------------------- --------
                  • -------- Spell Ending --------
                  • -------- ----------------------- --------
                  • Set PH_Index[1] = (PH_Index[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PH_Index[1] Equal to 0
                    • Then - Actions
                      • Set PH_Index[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions


Keywords:
Meat, Hook, Power, Electric, Boomerang, Calex3
Contents

Power Hook v1.3 [GUI,calex3] (Map)

Reviews
Moderator
18:37, 22nd Dec 2009 TriggerHappy: Review for Spell The coding looked decent and I couldn't produce any bugs. Status Feel free to message me here if you have any issues with my review or if you have updated your resource and...
  1. 18:37, 22nd Dec 2009
    TriggerHappy:
    Review for Spell
    The coding looked decent and I couldn't produce any bugs.
    Status
    Feel free to message me here if you have any issues with
    my review or if you have updated your resource and want it reviewed again.
    Approved
     
  2. X-OMG-X

    X-OMG-X

    Joined:
    Nov 10, 2008
    Messages:
    1,942
    Resources:
    16
    Icons:
    1
    Skins:
    3
    Maps:
    2
    Spells:
    8
    Template:
    1
    Tutorials:
    1
    Resources:
    16
    Looks cool and doesnt seem to leak. Nice job.
     
  3. Axarion

    Axarion

    Joined:
    Sep 30, 2009
    Messages:
    675
    Resources:
    1
    Spells:
    1
    Resources:
    1
    In the movie the hooked unit is ever behind the caster o_O
    (Maybe cause of pathing dunno) But please add more documentation. Anyhow a nice spell but not really new idea :p
     
  4. calex3

    calex3

    Joined:
    Mar 2, 2009
    Messages:
    285
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Added more documentation
     
  5. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Improvements:
    Make a dummy unit, and make it be paused, so you can use your hero while the hook is flying away.

    I can't belive people make spells like this but so little creativity deprives them of a much better thing :)

    Make the dummy caster paused, and make the unit get hooked to the dummy caster, thus making the real caster able to move while the one really paused is the dummy one.

    Also one more improvement is to reduce the loop triggers period to 0.03-0.02 making the hook look really better and the whole effect generaly better.
     
  6. calex3

    calex3

    Joined:
    Mar 2, 2009
    Messages:
    285
    Resources:
    3
    Spells:
    3
    Resources:
    3
    you mean pudge wars hook? .....
    -reduced time..
     
  7. jms

    jms

    Joined:
    Aug 16, 2009
    Messages:
    62
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Nice Spell but Leaks : If You are casting the spell and you press " ESC " while the caster is paused, when he finishes the spell , he casts it again..
     
  8. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    isn't that the in-game triggers that fucks it up?
     
  9. calex3

    calex3

    Joined:
    Mar 2, 2009
    Messages:
    285
    Resources:
    3
    Spells:
    3
    Resources:
    3
    It is not a leak -.-'
    It is the Channel's(base ability) bug....Esc is just a help and it bugs with Channel....it Won't bug in game because in game you won't going to have Esc to Refresh...

    EDITED SPELL:
    Now dummy is created at 100 towards next to caster...so now no unit will be moved behind caster...
     
  10. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    It can be fixed the way i suggested, using a dummy caster.

    Hope you implement it in the next version =)
     
  11. calex3

    calex3

    Joined:
    Mar 2, 2009
    Messages:
    285
    Resources:
    3
    Spells:
    3
    Resources:
    3
    I think that creating dummy 100 towards is much better? if you do this unit won't be moved behind the caster...
    still you can't move caster but if you can looks weird ....hook looks like broken it is not following you..
     
  12. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    You can move pudge in dota after he casts his hook, try it and see for yourself if you don't belive me :p
     
  13. matej

    matej

    Joined:
    Oct 27, 2009
    Messages:
    191
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    nice...
     
  14. calex3

    calex3

    Joined:
    Mar 2, 2009
    Messages:
    285
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Ok i made like in dota....when hook finishes it's destination moving foward you will be unpaused....but if it hooks someone you will stay paused until it reaches to you..
    :)
     
  15. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Remove invulnerability from the caster while paused, it is imbalanced.
     
  16. calex3

    calex3

    Joined:
    Mar 2, 2009
    Messages:
    285
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Ok updated
     
  17. Gmeister

    Gmeister

    Joined:
    Jul 20, 2009
    Messages:
    24
    Resources:
    0
    Resources:
    0
    It`s great, i like your spell...

    Congratulation man... Fuck =D
     
  18. Guishiu

    Guishiu

    Joined:
    Apr 7, 2008
    Messages:
    160
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Why do people try to copy Dota spells? If your spell is a variation of Dota's original that is fine. Perhaps someone will find it more useful in their map. Besides has anyone tried that League of Legends game? Its horrible
     
  19. Sorceress

    Sorceress

    Joined:
    Jul 28, 2009
    Messages:
    1,021
    Resources:
    1
    Template:
    1
    Resources:
    1
    love it!