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

Need help with fixing leaks in tiggers

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Please move my thread to Triggers & Scripts.Ok so gui and leaks are dark magic for me i will post tiggers wich have leaks please tell me how to fix them.
  • Init UI
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Set (Picked player)'s camera Height Offset to 1000.00 over 1.00 seconds
      • Trigger - Turn off Germany Extra Income <gen>
      • Trigger - Turn off Lend Lease Income <gen>
      • Trigger - Turn off Units Soviet Buildup <gen>
      • Trigger - Turn off Cold War Fighting <gen>
      • Trigger - Turn off Cold War Forced Enemy <gen>
      • Trigger - Turn off Western <gen>
      • Trigger - Turn off Greece Extra Income <gen>
      • Countdown Timer - Create a timer window for Turn with title Iconome in :
      • Set Turn_TimerWindow = (Last created timer window)
      • Countdown Timer - Start Turn as a Repeating timer that will expire in 60.00 seconds
type of leak Type: timer
CreateTimer [Blizzard.j:605]
  • Warsaw Recaptured
    • Events
      • Unit - City 0044 <gen> Changes owner
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 7 (Green)
          • (Owner of (Triggering unit)) Equal to Player 8 (Pink)
    • Actions
      • Unit - Change ownership of City 0043 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of Town 0299 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of City 0044 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of Town 0300 <gen> to Player 3 (Teal) and Change color
      • Game - Display to (All players) for 30.00 seconds the text: Warsaw has been rec...
      • Camera - Pan camera for Player 3 (Teal) to (Position of City 0043 <gen>) over 1.00 seconds
Type: location
Trig_Warsaw_Recaptured_Actions [war3map.j:8033]
PanCameraToTimedLocForPlayer [war3map.j:8032]
GetUnitLoc [war3map.j:8032]
  • Warsaw Capture USSR
    • Events
      • Unit - City 0044 <gen> Changes owner
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Trigger - Turn on America income Copy 6 Copy 2 Copy <gen>
      • Player - Set name of Player 3 (Teal) to Soviet Poland
      • Unit - Change ownership of City 0043 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of Town 0299 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of City 0044 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of Town 0300 <gen> to Player 3 (Teal) and Change color
      • Game - Display to (All players) for 30.00 seconds the text: Red army liberates ...
      • Camera - Pan camera for Player 3 (Teal) to (Position of City 0043 <gen>) over 1.00 seconds
Type: location
Trig_Warsaw_Capture_USSR_Actions [war3map.j:8062]
PanCameraToTimedLocForPlayer [war3map.j:8061]
GetUnitLoc [war3map.j:8061]
  • pol to eng
    • Events
      • Unit - City 0044 <gen> Changes owner
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    • Actions
      • Unit Group - Pick every unit in (Units owned by Neutral Passive of type WarsawMustFall) and do (Unit - Remove (Picked unit) from the game)
      • Unit - Change ownership of City 2795 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of Town 2290 <gen> to Player 1 (Red) and Change color
      • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Ally with shared vision
      • Player - Make Player 3 (Teal) treat Player 1 (Red) as an Ally with shared vision
      • Trigger - Turn on America income Copy 4 <gen>
      • Unit - Change ownership of Town 0265 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0457 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of City 0045 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0054 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of City 0052 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0183 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0046 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0184 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of City 1008 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0185 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 1009 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0053 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of Town 0180 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of City 0870 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of City 0177 <gen> to Player 1 (Red) and Change color
      • Unit - Change ownership of City 0044 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of Town 0299 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of City 0043 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of Town 0047 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of City 0051 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of Town 0049 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of Town 0050 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of Town 0300 <gen> to Player 9 (Gray) and Change color
      • Unit - Change ownership of Town 0048 <gen> to Player 9 (Gray) and Change color
      • Unit Group - Pick every unit in (Units in Polacy gg <gen> owned by Player 3 (Teal)) and do (Unit - Kill (Picked unit))
      • Unit - Change ownership of Town 0141 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of City 0140 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of City 0303 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of City 0302 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of City 0301 <gen> to Player 3 (Teal) and Change color
      • Unit - Change ownership of City 0304 <gen> to Player 3 (Teal) and Change color
      • Game - Display to (All players) for 30.00 seconds the text: Warsaw has been cap...
      • Camera - Pan camera for Player 3 (Teal) to (Position of Town 0141 <gen>) over 1.00 seconds
      • Trigger - Turn on Germany Extra Income <gen>
      • Trigger - Turn off (This trigger)
Type: location
Trig_pol_to_eng_Actions [war3map.j:8137]
PanCameraToTimedLocForPlayer [war3map.j:8134]
GetUnitLoc [war3map.j:8134]
 
Level 14
Joined
Nov 30, 2013
Messages
926
The 2nd, 3rd, and 4th trigger leaks because of the Pan Camera while the first trigger leaks because of the timer.
Also you should create a temporary point like this.
  • Actions
    • Set TempPoint = (Position of Footman 0000 <gen>)
    • Camera - Pan camera for Player 3 (Teal) to (TempPoint) over 1.00 seconds
    • Custom script: call RemoveLocation(udg_TempPoint)
That way, it will remove the point after being used to prevent leak.
Things That Leak
The link above enlisted some of the leaks that can occur, some of them cannot be removed like Pan Camera. I never experienced having a timer to leak.
 
Status
Not open for further replies.
Top