• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hook ability

Status
Not open for further replies.
Level 6
Joined
Feb 21, 2008
Messages
205
Do explain more. I know what you want so I'll explain for others:

You click the ground infront of you, then a hook appears and flies straight forward in that line, if it hits some1, that unit will be dragged back to the caster.
 
once again here it is
  • MH Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Meat Hook
    • Actions
      • Set MH_Level = (Level of Meat Hook for (Triggering unit))
      • Set MH_Angle = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
      • Set MH_Unit[1] = (Triggering unit)
      • Unit - Pause MH_Unit[1]
      • Trigger - Turn on MH Extend <gen>
  • MH Extend
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MH_Links Less than (10 + (12 x MH_Level))
        • Then - Actions
          • Set MH_Links = (MH_Links + 1)
          • Unit - Create 1 Meat Hook for (Owner of MH_Unit[1]) at ((Position of MH_Unit[1]) offset by (Real((40 x MH_Links))) towards MH_Angle degrees) facing MH_Angle degrees
          • Set MH_Link[MH_Links] = (Last created unit)
          • Unit - Turn collision for MH_Link[MH_Links] Off
          • Set Temp_Group = (Units within 115.00 of (Position of MH_Link[MH_Links]) matching (((Matching unit) is alive) Equal to True))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MH_Links Greater than 3
            • Then - Actions
              • Set MH_Unit[2] = (Random unit from Temp_Group)
              • Unit - Turn collision for MH_Unit[2] Off
              • Custom script: call DestroyGroup(udg_Temp_Group)
              • Custom script: set udg_Temp_Group = null
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (MH_Unit[2] belongs to an ally of (Owner of MH_Unit[1])) Equal to False
                  • (MH_Unit[2] is A ground unit) Equal to True
                  • (MH_Unit[2] is A structure) Equal to False
                • Then - Actions
                  • Unit - Cause MH_Unit[1] to damage MH_Unit[2], dealing (100.00 x (Real(MH_Level))) damage of attack type Chaos and damage type Normal
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MH_Unit[2] is A structure) Equal to False
              • (MH_Unit[2] is A ground unit) Equal to True
              • MH_Unit[2] Not equal to No unit
            • Then - Actions
              • Trigger - Turn on MH Retract <gen>
              • Trigger - Turn off (This trigger)
            • Else - Actions
        • Else - Actions
          • Trigger - Turn on MH Retract <gen>
          • Trigger - Turn off (This trigger)
  • MH Retract
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit - Move MH_Unit[2] instantly to (Position of MH_Link[MH_Links])
      • Unit - Kill MH_Link[MH_Links]
      • Set MH_Links = (MH_Links - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (MH_Unit[2] belongs to an ally of (Owner of MH_Unit[1])) Equal to False
          • (MH_Unit[2] is A ground unit) Equal to True
          • (MH_Unit[2] is A structure) Equal to False
        • Then - Actions
          • Unit - Cause MH_Unit[1] to damage MH_Unit[2], dealing (3.00 x (Real(MH_Level))) damage of attack type Chaos and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MH_Links Equal to 0
        • Then - Actions
          • Unit - Unpause MH_Unit[1]
          • Unit - Turn collision for MH_Unit[2] On
          • Unit - Move MH_Unit[2] instantly to ((Position of MH_Unit[1]) offset by 128.00 towards MH_Angle degrees), facing (Facing of MH_Unit[2]) degrees
          • Custom script: set udg_MH_Unit[2] = null
          • Custom script: set udg_MH_Unit[1] = null
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Status
Not open for further replies.
Top