I found a map of a mui meat hook using gui here http://www.epicwar.com/maps/41821/.
I was just wondering how to change the range of the meat hook in the trigger.
Here's the trigger.
I was just wondering how to change the range of the meat hook in the trigger.
Here's the trigger.
Code:
Meat Hook
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Meat Hook
Actions
Set TempBoolean = False
For each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempBoolean Equal to False
MeatHookCaster[(Integer A)] Equal to No unit
Then - Actions
Set TempInteger = (Integer A)
Set TempBoolean = True
Else - Actions
Set MeatHookCaster[TempInteger] = (Casting unit)
Set TempPoint1 = (Position of (Casting unit))
Set TempPoint2 = (Target point of ability being cast)
Set MeatHookAngle[TempInteger] = (Angle from TempPoint1 to TempPoint2)
Set MeatHookHooked[TempInteger] = False
Set MeatHookLoop[TempInteger] = 0
Set MeatHookTarget[TempInteger] = No unit
Code:
Meat Hook Pull
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MeatHookCaster[(Integer A)] Not equal to No unit
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MeatHookHooked[(Integer A)] Equal to False
Then - Actions
Set MeatHookLoop[(Integer A)] = (MeatHookLoop[(Integer A)] + 1)
Set TempPoint1 = (Position of MeatHookCaster[(Integer A)])
Set TempPoint2 = (TempPoint1 offset by (50.00 x (Real(MeatHookLoop[(Integer A)]))) towards MeatHookAngle[(Integer A)] degrees)
Unit - Create 1 Hook for (Owner of MeatHookCaster[(Integer A)]) at TempPoint2 facing MeatHookAngle[(Integer A)] degrees
Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
Set MeatHooker[(((Integer A) x 100) + MeatHookLoop[(Integer A)])] = (Last created unit)
Set TempGroup = (Units within 100.00 of TempPoint2 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((Owner of (Matching unit)) Not equal to (Owner of MeatHookCaster[(Integer A)])))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempGroup is empty) Equal to False
Then - Actions
Set MeatHookHooked[(Integer A)] = True
Set MeatHookTarget[(Integer A)] = (Random unit from TempGroup)
Unit - Pause MeatHookTarget[(Integer A)]
Unit - Turn collision for MeatHookTarget[(Integer A)] Off
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(MeatHookTarget[(Integer A)] belongs to an enemy of (Owner of MeatHookCaster[(Integer A)])) Equal to True
Then - Actions
Unit - Cause MeatHookCaster[(Integer A)] to damage MeatHookTarget[(Integer A)], dealing 500.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the origin of MeatHookTarget[(Integer A)] using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call RemoveLocation(udg_TempPoint1)
Custom script: call RemoveLocation(udg_TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MeatHookLoop[(Integer A)] Greater than or equal to 19
Then - Actions
Set MeatHookHooked[(Integer A)] = True
Else - Actions
Else - Actions
Set TempPoint1 = (Position of MeatHooker[(((Integer A) x 100) + MeatHookLoop[(Integer A)])])
Unit - Remove MeatHooker[(((Integer A) x 100) + MeatHookLoop[(Integer A)])] from the game
Set MeatHookLoop[(Integer A)] = (MeatHookLoop[(Integer A)] - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MeatHookTarget[(Integer A)] Not equal to No unit
Then - Actions
Unit - Move MeatHookTarget[(Integer A)] instantly to TempPoint1
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(MeatHookTarget[(Integer A)] belongs to an enemy of (Owner of MeatHookCaster[(Integer A)])) Equal to True
Then - Actions
Special Effect - Create a special effect attached to the origin of MeatHookTarget[(Integer A)] using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
Custom script: call RemoveLocation(udg_TempPoint1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MeatHookLoop[(Integer A)] Less than or equal to 0
Then - Actions
Unit - Unpause MeatHookTarget[(Integer A)]
Unit - Turn collision for MeatHookTarget[(Integer A)] On
Set MeatHookCaster[(Integer A)] = No unit
Set MeatHookTarget[(Integer A)] = No unit
Else - Actions
Else - Actions