1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  3. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  4. Gather 'round - the 20th Icon Contest Poll is out.
    Dismiss Notice
  5. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    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.

Phantom Hook

Submitted by Demongrip
This bundle is marked as approved. It works and satisfies the submission rules.
While we are still in line phantom spells,I decided to make a spell that can be somehow original.And here it is.
Phantom Hook:
The Warden shoots out a hook.Unlike the other hooks this hook follows the facing of the caster and can be controlled.The hook travels some range and if it hits a target,it deals damage and creates a copy of the warden that has 125 hitpoints and 25 damage,and lasts 3 seconds.Meanwhile the Warden hide herself,dissapearing from sight.The invisibility lasts 7 seconds.
Level 1-Hook has 500 range and deals 75 damage.
Level 2-Hook has 800 range and deals 150 damage.
Level 3-Hook has 1100 range and deals 225 damage.
Code
  • PH cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Phantom Hook
    • Actions
      • 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 PH Loop <gen>
        • Else - Actions
      • -------- The actions index 1 sets the instances on which the spell is running,whily index 2 is used to store the data. --------
      • Set PH_Index[1] = (PH_Index[1] + 1)
      • Set PH_Index[2] = (PH_Index[2] + 1)
      • Set PH_Caster[PH_Index[2]] = (Triggering unit)
      • Set PH_Point1[PH_Index[2]] = (Position of PH_Caster[PH_Index[2]])
      • Set PH_Point2[PH_Index[2]] = (Target point of ability being cast)
      • Unit - Create 1 Hook for (Owner of PH_Caster[PH_Index[2]]) at PH_Point1[PH_Index[2]] facing (Facing of PH_Caster[PH_Index[2]]) degrees
      • Set PH_Hook[PH_Index[2]] = (Last created unit)
      • Set PH_Point4[PH_Index[2]] = (Position of PH_Hook[PH_Index[2]])
      • Unit - Order PH_Hook[PH_Index[2]] to Move To PH_Point2[PH_Index[2]]
      • -------- The next 3 actions create the lighting effect.The change color action changes the color of the effect. --------
      • Lightning - Create a Finger of Death lightning effect from source PH_Point1[PH_Index[2]] to target PH_Point4[PH_Index[2]]
      • Set PH_lighting[PH_Index[2]] = (Last created lightning effect)
      • Lightning - Change color of PH_lighting[PH_Index[2]] to (0.75 0.00 1.00) with 1.00 alpha
      • Custom script: call RemoveLocation(udg_PH_Point1[udg_PH_Index[2]])
      • Custom script: call RemoveLocation(udg_PH_Point2[udg_PH_Index[2]])
      • Custom script: call RemoveLocation(udg_PH_Point4[udg_PH_Index[2]])

  • PH 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_Hook[PH_Index[3]] is alive) Equal to True
            • Then - Actions
              • Set PH_Point1[PH_Index[3]] = (Position of PH_Caster[PH_Index[3]])
              • Set PH_Point4[PH_Index[3]] = (Position of PH_Hook[PH_Index[3]])
              • -------- The next action sets the distance on which the hook will travel-The facing of the caster means the distance is depend on where the caster looks --------
              • Set PH_Point3[PH_Index[3]] = (PH_Point1[PH_Index[3]] offset by (((Real((Level of Phantom Hook for PH_Caster[PH_Index[3]]))) x 300.00) + 200.00) towards (Facing of PH_Caster[PH_Index[3]]) degrees)
              • -------- This action checks if the hook reached it`s final destination --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between PH_Point4[PH_Index[3]] and PH_Point3[PH_Index[3]]) Greater than or equal to 50.00
                • Then - Actions
                  • Set PH_Point6[PH_Index[3]] = (PH_Point4[PH_Index[3]] offset by 25.00 towards (Angle from PH_Point4[PH_Index[3]] to PH_Point3[PH_Index[3]]) degrees)
                  • Unit - Move PH_Hook[PH_Index[3]] instantly to PH_Point6[PH_Index[3]]
                  • Unit - Make PH_Hook[PH_Index[3]] face (Facing of PH_Caster[PH_Index[3]]) over 0.00 seconds
                  • Lightning - Move PH_lighting[PH_Index[3]] to source PH_Point1[PH_Index[3]] and target PH_Point4[PH_Index[3]]
                  • Set PH_Group[PH_Index[3]] = (Units within 60.00 of PH_Point4[PH_Index[3]] matching ((((Matching unit) is dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of PH_Hook[PH_Index[3]])) Equal to True)))
                  • Unit Group - Pick every unit in PH_Group[PH_Index[3]] and do (Actions)
                    • Loop - Actions
                      • Set PH_Point5[PH_Index[3]] = (Position of (Picked unit))
                      • -------- The next trigger damages the target. --------
                      • Unit - Cause PH_Hook[PH_Index[3]] to damage (Picked unit), dealing ((Real((Level of Phantom Hook for PH_Caster[PH_Index[3]]))) x 75.00) damage of attack type Spells and damage type Normal
                      • Unit - Add a 0.01 second Generic expiration timer to PH_Hook[PH_Index[3]]
                      • Unit - Create 1 Dummy(invisibility) for (Owner of PH_Hook[PH_Index[3]]) at PH_Point1[PH_Index[3]] facing Default building facing degrees
                      • Unit - Add Invisibility to (Last created unit)
                      • Unit - Order (Last created unit) to Human Sorceress - Invisibility PH_Caster[PH_Index[3]]
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Lightning - Destroy PH_lighting[PH_Index[3]]
                      • Unit - Create 1 Phantom Illusion for (Owner of PH_Hook[PH_Index[3]]) at PH_Point5[PH_Index[3]] facing Default building facing degrees
                      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                      • Unit - Make (Last created unit) Explode on death
                      • -------- The next trigger set the instance of the spell by -1 --------
                      • Set PH_Index[1] = (PH_Index[1] - 1)
                      • -------- The next action checks if there are no running instances of the spell.If it is 0 then the trigger will turn off. --------
                      • 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
                      • Custom script: call RemoveLocation(udg_PH_Point5[udg_PH_Index[3]])
                  • Custom script: call RemoveLocation(udg_PH_Point6[udg_PH_Index[3]])
                  • Custom script: call DestroyGroup(udg_PH_Group[udg_PH_Index[3]])
                • Else - Actions
                  • Unit - Add a 0.01 second Generic expiration timer to PH_Hook[PH_Index[3]]
                  • Lightning - Destroy PH_lighting[PH_Index[3]]
                  • -------- The next trigger set the instance of the spell by -1 --------
                  • Set PH_Index[1] = (PH_Index[1] - 1)
                  • -------- The next action checks if there are no running instances of the spell.If it is 0 then the trigger will turn off. --------
                  • 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
              • Custom script: call RemoveLocation(udg_PH_Point1[udg_PH_Index[3]])
              • Custom script: call RemoveLocation(udg_PH_Point4[udg_PH_Index[3]])
              • Custom script: call RemoveLocation(udg_PH_Point3[udg_PH_Index[3]])
            • Else - Actions




Main credits go to StaberFire and his phantom bolt for the inspiration and the hook visual effect:http://www.hiveworkshop.com/forums/spells-569/phantom-bolt-v1-1-a-143471/

Updates:
v1.0 Initial release.
v1.1 Fixed the only known bug to me.
v1.11 Removed 2 forgotten leak locations.
v1.2 Some cosmetix changes.
v1.3 Added documentation how to implement and for the actions that can be changed.Changed the Illusion name to Phantom Illusion

Keywords:
Phantom,Hook
Contents

Phantom Hook (Map)

Reviews
Moderator
21:05, 6th Feb 2010 The_Reborn_Devil: The triggering looks good, and there are no leaks. Status: Approved Rating: Useful
  1. 21:05, 6th Feb 2010
    The_Reborn_Devil:
    The triggering looks good, and there are no leaks.

    Status: Approved
    Rating: Useful
     
  2. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    Well here it is-the phantom hook.I forgot to write in the ingame description that it can be controlled.It follows the warden`s vision.If you find any bugs,please tell me so i can fix them.
    Current Bugs:
    The hook sometimes doesn`t dissapear when the caster isn`t moving(fixed in v1.1)
    One forgotten leak location(fixed in v1.11)
    Another location leak(fixed in v1.11)
     
    Last edited: Feb 14, 2010
  3. Dark Hunter1357

    Dark Hunter1357

    Joined:
    Feb 20, 2007
    Messages:
    778
    Resources:
    29
    Models:
    20
    Icons:
    6
    Maps:
    2
    Tutorials:
    1
    Resources:
    29
  4. Vercas

    Vercas

    Joined:
    Dec 9, 2007
    Messages:
    2,604
    Resources:
    1
    Spells:
    1
    Resources:
    1
    How about another version of phantom hook?
    It goes towars the target point (a number of range) and picks a unit. Pulls it towards the caster BUT the unit goes right trough the caster, behing, at the same range the unit was picked.
     
  5. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    I`ll try to make that version vercas,thanks for the suggestion
     
    Last edited: Feb 14, 2010
  6. StaberFire

    StaberFire

    Joined:
    Jun 28, 2008
    Messages:
    681
    Resources:
    8
    Icons:
    4
    Skins:
    1
    Spells:
    3
    Resources:
    8
    Well, a couple things to fix:
    Firstly and most importantly, when the caster casts the ability then immediately turns and doesn't stop turning, the hook will waver around moving in and out as long as the caster doesn't stop turning. I'm not sure if this is an intentional effect, but I thought I should point it out.
    Secondly, and just for cosmetics, the head of the hook doesn't turn when you turn, so it looks weird. Just make an angle variable and set the head's facing in the loop trigger.
     
  7. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    "Unlike the other hooks this hook follows the facing of the caster and can be controlled."
    It`s a feature that makes the spell more original maybe you haven`t looked at the description and my first comment but nvm.About the second one well i`ll look what I can do on it.
    The hook requested by vercas is done,I`ll upload it when I`m sure that the first one doesn`t have problems.
    Staber I hope you like it,because your phantom bolt was my inspiration for this spell.
     
    Last edited: Feb 14, 2010
  8. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,022
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    i think waht he means is that as the hook turns in the direction of the warden, the dummy you use as the hook faces the same angle (like 0 or 90 degrees)
     
  9. StaberFire

    StaberFire

    Joined:
    Jun 28, 2008
    Messages:
    681
    Resources:
    8
    Icons:
    4
    Skins:
    1
    Spells:
    3
    Resources:
    8
    Yeah, I do like it, I just wanna make sure it's the best it can be. =P

    And yes, what Just_Spectating said is what I meant, I probably should have been a bit clearer. Just use the "Unit - Make (Unit) face (Angle) over (0.00) seconds" in your loop trigger. It's just to make the spell look smoother.
     
  10. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    Allright,here is v1.2-I have changed the unit facing as you told me,also I made the hook slighty bigger so it can be more visible.
     
    Last edited: Feb 14, 2010
  11. Lambdadelta

    Lambdadelta

    Joined:
    Jul 6, 2009
    Messages:
    721
    Resources:
    1
    Maps:
    1
    Resources:
    1
    WUT? It is not accurate, I standing still, aim the Hook at the Gnoll, guess what? It misses, a straight click misses? Why base it off Facing angle, I know you can control it but still :(

    Also, what is up with the delay in invisibility and illusion? Dummy casters should have 0 animation backswing.

    Coding I would check, but I hate giant text of GUI MUI stuff.

    I might try those 'template' reviews one day.... :D
     
  12. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    Ya it`s because of the facing angle thats why it sometimes misses.I`ll look at the trigger again and fix it if I can.
    Update:I made some experiments and they led to this-it`s really from the facing angle,it`s somekinda buggy the unit can`t rotate to every point.I can change the angles but if I do that it will be just an ordinary hook with different visual and spell effect,and it will lose it`s originality.Also i forgot to mention that it can happen only in very rare situations and if you got enough skill to control it it won`t have any problems.I tested it many times and i can say it bugs very rare and only in the same location.It`s up to you guys what you want me to change.Also I tested the animation backswing,but the delay is still there,so it won`t be any change if I set the backswing.
     
    Last edited: Sep 13, 2009
  13. Lambdadelta

    Lambdadelta

    Joined:
    Jul 6, 2009
    Messages:
    721
    Resources:
    1
    Maps:
    1
    Resources:
    1
    There shouldn't be a delay, with 0.00 backswing, try removing the dummies move ability to make it even more instant. call UnitRemoveAbility( unit, 'Amov' )
     
  14. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    You can try it on your own,you will see there is no differense.
    Update 1.3 is here-with documentation how to implement and change the mostly needed actions
     
    Last edited: Feb 14, 2010
  15. arphax214

    arphax214

    Joined:
    Aug 20, 2008
    Messages:
    388
    Resources:
    0
    Resources:
    0
    how well i import this spell?pls help!
     
  16. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    I made in-game documentation how to import and change the spell stats.
     
  17. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Dummy should use "flying" movement if it isn't already.

    Please put the code in the description, since some people are too lazy to download (read: me).
     
  18. Demongrip

    Demongrip

    Joined:
    Sep 8, 2009
    Messages:
    80
    Resources:
    6
    Spells:
    6
    Resources:
    6
    The unit had flying or hover speed I think.No description since this spell was made half an year ago I`ll put the code.
     
  19. Itachi009

    Itachi009

    Joined:
    Dec 8, 2008
    Messages:
    97
    Resources:
    0
    Resources:
    0
    Nice Hook, and nice work on triggers too
    The only thing that disturbs me is that it follows the casters facing, thats sometimes really confusing, and i dont think it will take its originality if you remove this, and an alternative to this could be: it follows the casters angle, but not direct, when the caster looks to the left side, the hook will turn 1 angle per 0.02 sec or something like that so the hook just goes towards the casters facing with an constant speed
    but its your spell
    gj