- Joined
- Oct 2, 2011
- Messages
- 2,490
[SOLVED] Hookshot Crash
Is there something wrong with this?
It works perfectly for me, but two Hivers who tested it reported crashes assosiated with this trigger.
The ability fires a hookshot in casters facing direction, and pulls in small (Summoned) units and pulls the caster to all other targets.
Here are the other two triggers that this trigger utilizes:
Here you can find a test map with the trigger:
http://www.hiveworkshop.com/forums/requests-341/bug-hunting-opinions-278861/
Is there something wrong with this?
It works perfectly for me, but two Hivers who tested it reported crashes assosiated with this trigger.
The ability fires a hookshot in casters facing direction, and pulls in small (Summoned) units and pulls the caster to all other targets.
-
HookshotMissile
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
Trigger - Turn off Move <gen>
-
Set Pos1 = (Position of HookshotMissile)
-
Set Pos2 = (Position of Char)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Pos2 and Pos1) Greater than 600.00
-
-
Then - Actions
-
Unit - Remove HookshotMissile from the game
-
Animation - Reset Char's animation
-
Lightning - Destroy (Last created lightning effect)
-
Trigger - Turn on Move <gen>
-
Set CurrentlyAttacking = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
MoveDown Equal to True
-
MoveRight Equal to True
-
MoveUp Equal to True
-
MoveLeft Equal to True
-
-
-
-
Then - Actions
-
Custom script: call SetUnitAnimationByIndex(udg_Char, 2)
-
-
Else - Actions
-
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Set Pos3 = (Pos1 offset by 40.00 towards (Facing of HookshotMissile) degrees)
-
Unit - Move HookshotMissile instantly to Pos3
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in (Units within 80.00 of Pos3 matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))) Greater than 0
-
-
Then - Actions
-
Set UnitGroup = (Units within 80.00 of Pos3 matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
-
Unit Group - Pick every unit in UnitGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is Summoned) Not equal to True
-
-
Then - Actions
-
Trigger - Turn on HookshotPull <gen>
-
-
Else - Actions
-
Set HookshotGrabbedItem = (Picked unit)
-
Trigger - Turn on HookshotPullObject <gen>
-
-
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\PriestMissile\PriestMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Cause Char to damage (Picked unit), dealing (CharDamage / 2.00) damage of attack type Spells and damage type Normal
-
-
-
Custom script: call DestroyGroup (udg_UnitGroup)
-
Unit - Turn collision for Char Off
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Trigger - Turn off HookshotPull <gen>
-
Trigger - Turn off HookshotPullObject <gen>
-
-
-
Custom script: call RemoveLocation (udg_Pos3)
-
-
-
Custom script: call RemoveLocation (udg_Pos1)
-
Set Pos1 = (Position of HookshotMissile)
-
Custom script: call MoveLightningEx(udg_HookLightning, true, GetLocationX(udg_Pos1), GetLocationY(udg_Pos1), GetLocationZ(udg_Pos1) + 50, GetLocationX(udg_Pos2), GetLocationY(udg_Pos2), GetLocationZ(udg_Pos2) + 50)
-
Custom script: call RemoveLocation (udg_Pos1)
-
Custom script: call RemoveLocation (udg_Pos2)
-
-
-
HookshotPull
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
Animation - Change HookshotMissile's animation speed to 0.00% of its original speed
-
Custom script: call SetUnitAnimationByIndex(udg_Char, 15)
-
Set Pos1 = (Position of Char)
-
Set Pos3 = (Position of HookshotMissile)
-
Set Pos2 = (Pos1 offset by 45.00 towards (Angle from Pos1 to Pos3) degrees)
-
Unit - Move Char instantly to Pos2
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Pos3 and Pos1) Less than 128.00
-
-
Then - Actions
-
Animation - Reset Char's animation
-
Unit - Remove HookshotMissile from the game
-
Lightning - Destroy (Last created lightning effect)
-
Trigger - Turn off (This trigger)
-
Trigger - Turn off HookshotMissile <gen>
-
Unit - Turn collision for Char On
-
Set CurrentlyAttacking = False
-
Trigger - Turn on Move <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
MoveDown Equal to True
-
MoveRight Equal to True
-
MoveUp Equal to True
-
MoveLeft Equal to True
-
-
-
-
Then - Actions
-
Custom script: call SetUnitAnimationByIndex(udg_Char, 2)
-
-
Else - Actions
-
-
-
Else - Actions
-
Trigger - Turn off Move <gen>
-
-
-
Custom script: call DestroyGroup (udg_UnitGroup)
-
Custom script: call MoveLightningEx(udg_HookLightning, true, GetLocationX(udg_Pos1), GetLocationY(udg_Pos1), GetLocationZ(udg_Pos1) + 50, GetLocationX(udg_Pos3), GetLocationY(udg_Pos3), GetLocationZ(udg_Pos3) + 50)
-
Custom script: call RemoveLocation (udg_Pos1)
-
Custom script: call RemoveLocation (udg_Pos2)
-
Custom script: call RemoveLocation (udg_Pos3)
-
-
-
HookshotPullObject
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
Animation - Change HookshotMissile's animation speed to 0.00% of its original speed
-
Custom script: call SetUnitAnimationByIndex(udg_Char, 2)
-
Set Pos1 = (Position of HookshotMissile)
-
Set Pos3 = (Position of Char)
-
Set Pos2 = (Pos1 offset by 45.00 towards (Angle from Pos1 to Pos3) degrees)
-
Unit - Move HookshotMissile instantly to Pos2
-
Custom script: call RemoveLocation (udg_Pos1)
-
Set Pos1 = (Position of HookshotMissile)
-
Unit - Move HookshotGrabbedItem instantly to Pos1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Pos3 and Pos1) Less than 128.00
-
-
Then - Actions
-
Set HookshotGrabbedItem = No unit
-
Animation - Reset Char's animation
-
Unit - Remove HookshotMissile from the game
-
Lightning - Destroy (Last created lightning effect)
-
Trigger - Turn off (This trigger)
-
Trigger - Turn off HookshotMissile <gen>
-
Unit - Turn collision for Char On
-
Set CurrentlyAttacking = False
-
Trigger - Turn on Move <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
MoveDown Equal to True
-
MoveRight Equal to True
-
MoveUp Equal to True
-
MoveLeft Equal to True
-
-
-
-
Then - Actions
-
Custom script: call SetUnitAnimationByIndex(udg_Char, 2)
-
-
Else - Actions
-
-
-
Else - Actions
-
Trigger - Turn off Move <gen>
-
-
-
Custom script: call DestroyGroup (udg_UnitGroup)
-
Custom script: call MoveLightningEx(udg_HookLightning, true, GetLocationX(udg_Pos1), GetLocationY(udg_Pos1), GetLocationZ(udg_Pos1) + 50, GetLocationX(udg_Pos3), GetLocationY(udg_Pos3), GetLocationZ(udg_Pos3) + 50)
-
Custom script: call RemoveLocation (udg_Pos1)
-
Custom script: call RemoveLocation (udg_Pos2)
-
Custom script: call RemoveLocation (udg_Pos3)
-
-
http://www.hiveworkshop.com/forums/requests-341/bug-hunting-opinions-278861/
Last edited: