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

Phantom Hook

  • Like
Reactions: StaberFire
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.
  • 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
21:05, 6th Feb 2010 The_Reborn_Devil: The triggering looks good, and there are no leaks. Status: Approved Rating: Useful

Moderator

M

Moderator

21:05, 6th Feb 2010
The_Reborn_Devil:
The triggering looks good, and there are no leaks.

Status: Approved
Rating: Useful
 
Level 7
Joined
Sep 8, 2009
Messages
90
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:
Level 12
Joined
Jun 28, 2008
Messages
688
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.
 
Level 7
Joined
Sep 8, 2009
Messages
90
"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:
Level 12
Joined
Jun 28, 2008
Messages
688
Staber I hope you like it,because your phantom bolt was my inspiration for this spell.

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.
 
Level 15
Joined
Jul 6, 2009
Messages
889
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
 
Level 7
Joined
Sep 8, 2009
Messages
90
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:
Level 5
Joined
Dec 8, 2008
Messages
102
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
 
Top