• 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.

[Trigger] trigger help

Status
Not open for further replies.
Level 7
Joined
Oct 15, 2005
Messages
283
well a friend made this trigger, and well i allways check the trigers with leak check. and it found a leak i was wondering if someone can help me fix this

(Line:1) Excel
(Line:2) Events
(Line:3) Unit - A unit Starts the effect of an ability
(Line:4) Conditions
(Line:5) Actions
(Line:6) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:7) If - Conditions
(Line:8) (Ability being cast) Equal to A.C.R.O.S.S Gun (Excell)
(Line:9) Then - Actions
(Line:10) Set GunPoint = (Target point of ability being cast)
(Line:11) Set Loc1 = (Position of (Casting unit))
(Line:12) Unit - Create 1 A.C.R.O.S.S Gun for (Owner of (Casting unit)) at Loc1 facing (Facing of (Casting unit)) degrees
(Line:13) Custom script: call RemoveLocation( udg_Loc1 )
(Line:14) Set ACROSS = (Last created unit)
(Line:15) Unit - Order ACROSS to Move To GunPoint
(Line:16) Wait until ((Distance between (Position of ACROSS) and GunPoint) Less than or equal to 50.00), checking every 0.10 seconds
(Line:17) Unit - Remove ACROSS from the game
(Line:18) Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at GunPoint facing Default building facing (270.0) degrees
(Line:19) Unit - Add Acrosse Gun (ExcellDamage) to (Last created unit)
(Line:20) Unit - Set level of Acrosse Gun (ExcellDamage) for (Last created unit) to (Level of A.C.R.O.S.S Gun (Excell) for (Casting unit))
(Line:21) Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
(Line:22) Custom script: call RemoveLocation( udg_GunPoint )
(Line:23) Else - Actions
(Line:24) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:25) If - Conditions
(Line:26) (Ability being cast) Equal to Stomach Growl (Excel)
(Line:27) Then - Actions
(Line:28) Set Loc1 = (Position of (Casting unit))
(Line:29) Special Effect - Create a special effect at Loc1 using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
(Line:30) Special Effect - Destroy (Last created special effect)
(Line:31) Environment - Create a 3.00 second Normal ripple deformation at Loc1 with starting radius 0.00, ending radius 2500.00, and depth 50.00, using 1.00 second ripples spaced 512.00 apart
(Line:32) Custom script: call RemoveLocation( udg_Loc1 )
(Line:33) Player Group - Pick every player in (All players) and do (Actions)
(Line:34) Loop - Actions
(Line:35) Camera - Shake the camera for (Picked player) with magnitude (2.00 x (Real((Level of Stomach Growl (Excel) for (Casting unit)))))
(Line:36) Wait 2.00 seconds
(Line:37) Player Group - Pick every player in (All players) and do (Actions)
(Line:38) Loop - Actions
(Line:39) Camera - Stop swaying/shaking the camera for (Picked player)
(Line:40) Else - Actions
(Line:41) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:42) If - Conditions
(Line:43) (Ability being cast) Equal to Ligthing Dance (Excel)
(Line:44) Then - Actions
(Line:45) Set Loc1 = (Position of (Casting unit))
(Line:46) Unit - Create 1 Thunder for (Owner of (Casting unit)) at Loc1 facing Default building facing (270.0) degrees
(Line:47) Environment - Create a 2.00 second Normal ripple deformation at Loc1 with starting radius 0.00, ending radius 600.00, and depth 120.00, using 1.00 second ripples spaced 712.00 apart
(Line:48) Set TempGroup = (Units within 1000.00 of Loc1 matching (((Owner of (Casting unit)) is an enemy of (Owner of (Matching unit))) Equal to True))
(Line:49) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:50) If - Conditions
(Line:51) (Number of units in TempGroup) Greater than or equal to 1
(Line:52) Then - Actions
(Line:53) For each (Integer B) from 1 to (2 x (Level of Ligthing Dance (Excel) for (Casting unit))), do (Actions)
(Line:54) Loop - Actions
(Line:55) Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at Loc1 facing Default building facing (270.0) degrees
(Line:56) Unit - Add Lighting Dance Lighting to (Last created unit)
(Line:57) Unit - Set level of Lighting Dance Lighting for (Last created unit) to (Level of Ligthing Dance (Excel) for (Casting unit))
(Line:58) Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Random unit from TempGroup)
(Line:59) Else - Actions
(Line:60) Custom script: call DestroyGroup( udg_TempGroup )
(Line:61) Custom script: call RemoveLocation( udg_Loc1 )
(Line:62) Else - Actions
(Line:63)
------------------
Total lines: 63

(Line: 16 ) (Word: 5 ) Position Leak
Wait until ((Distance between (Position of ACROSS) and GunPoint) Less than or equal to 50.00), checking every 0.10 seconds
Wait until ((Distance between ^Leak
(Suggested fix) Set L = (Position of ACROSS) and GunPoint) Less than or equal to 50.00), checking every 0.10 seconds
(Suggested fix) Custom Script: Call RemoveLocation(udg_L)
 
Level 7
Joined
Oct 15, 2005
Messages
283
Add this before line 16:
Set point variable = (location of across)

Then use var name instead of (loc of across) in line 16


ok thanks alot


EDIT

------------------
(Line:1) Excel
(Line:2) Events
(Line:3) Unit - A unit Starts the effect of an ability
(Line:4) Conditions
(Line:5) Actions
(Line:6) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:7) If - Conditions
(Line:8) (Ability being cast) Equal to A.C.R.O.S.S Gun (Excell)
(Line:9) Then - Actions
(Line:10) Set GunPoint = (Target point of ability being cast)
(Line:11) Set Loc1 = (Position of (Casting unit))
(Line:12) Unit - Create 1 A.C.R.O.S.S Gun for (Owner of (Casting unit)) at Loc1 facing (Facing of (Casting unit)) degrees
(Line:13) Custom script: call RemoveLocation( udg_Loc1 )
(Line:14) Set ACROSS = (Last created unit)
(Line:15) Set ACROSSPoint = (Position of (Last created unit))
(Line:16) Unit - Order ACROSS to Move To GunPoint
(Line:17) Wait until ((Distance between ACROSSPoint and GunPoint) Less than or equal to 50.00), checking every 0.10 seconds
(Line:18) Unit - Remove ACROSS from the game
(Line:19) Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at GunPoint facing Default building facing (270.0) degrees
(Line:20) Unit - Add Acrosse Gun (ExcellDamage) to (Last created unit)
(Line:21) Unit - Set level of Acrosse Gun (ExcellDamage) for (Last created unit) to (Level of A.C.R.O.S.S Gun (Excell) for (Casting unit))
(Line:22) Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
(Line:23) Custom script: call RemoveLocation( udg_GunPoint )
(Line:24) Else - Actions
(Line:25) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:26) If - Conditions
(Line:27) (Ability being cast) Equal to Stomach Growl (Excel)
(Line:28) Then - Actions
(Line:29) Set Loc1 = (Position of (Casting unit))
(Line:30) Special Effect - Create a special effect at Loc1 using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
(Line:31) Special Effect - Destroy (Last created special effect)
(Line:32) Environment - Create a 3.00 second Normal ripple deformation at Loc1 with starting radius 0.00, ending radius 2500.00, and depth 50.00, using 1.00 second ripples spaced 512.00 apart
(Line:33) Custom script: call RemoveLocation( udg_Loc1 )
(Line:34) Player Group - Pick every player in (All players) and do (Actions)
(Line:35) Loop - Actions
(Line:36) Camera - Shake the camera for (Picked player) with magnitude (2.00 x (Real((Level of Stomach Growl (Excel) for (Casting unit)))))
(Line:37) Wait 2.00 seconds
(Line:38) Player Group - Pick every player in (All players) and do (Actions)
(Line:39) Loop - Actions
(Line:40) Camera - Stop swaying/shaking the camera for (Picked player)
(Line:41) Else - Actions
(Line:42) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:43) If - Conditions
(Line:44) (Ability being cast) Equal to Ligthing Dance (Excel)
(Line:45) Then - Actions
(Line:46) Set Loc1 = (Position of (Casting unit))
(Line:47) Unit - Create 1 Thunder for (Owner of (Casting unit)) at Loc1 facing Default building facing (270.0) degrees
(Line:48) Environment - Create a 2.00 second Normal ripple deformation at Loc1 with starting radius 0.00, ending radius 600.00, and depth 120.00, using 1.00 second ripples spaced 712.00 apart
(Line:49) Set TempGroup = (Units within 1000.00 of Loc1 matching (((Owner of (Casting unit)) is an enemy of (Owner of (Matching unit))) Equal to True))
(Line:50) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Line:51) If - Conditions
(Line:52) (Number of units in TempGroup) Greater than or equal to 1
(Line:53) Then - Actions
(Line:54) For each (Integer B) from 1 to (2 x (Level of Ligthing Dance (Excel) for (Casting unit))), do (Actions)
(Line:55) Loop - Actions
(Line:56) Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at Loc1 facing Default building facing (270.0) degrees
(Line:57) Unit - Add Lighting Dance Lighting to (Last created unit)
(Line:58) Unit - Set level of Lighting Dance Lighting for (Last created unit) to (Level of Ligthing Dance (Excel) for (Casting unit))
(Line:59) Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Random unit from TempGroup)
(Line:60) Else - Actions
(Line:61) Custom script: call DestroyGroup( udg_TempGroup )
(Line:62) Custom script: call RemoveLocation( udg_Loc1 )
(Line:63) Else - Actions
------------------
Total lines: 63

Location variable has not been removed: ACROSSPoint

Completed
Total amount of leaks: 0
Leak Rating: Excellent
------------------


thanks man i owe you 1
 
Last edited:
Status
Not open for further replies.
Top