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

[Trigger] Guidance needed on removing gate trigger exploit.

Status
Not open for further replies.
Level 8
Joined
Jan 16, 2008
Messages
156
I've been using a gate trigger with lots of success for awhile, but initially it never had anything to stop people from opening and closing the gate rapidly, making it hard for the invaders to actually destroy the gate.

Thus I created this trigger below, and it works great, but unforunately I think this is the source of my memory leak, after I heard that this kind of event leaks. There are 16 gates in my map, each with a trigger like this. And literally tens of thousands of units enter these regions in the span of a single game.

I've been thinking about doing a "unit within range" event instead, would that event leak? It is very hard for me to test this unless I run the map on Battle.net, which means releasing a new version, so if anyone has some insight into how to fix this trigger, or another idea about a leakless trigger to fix the gate exploit, please let me know.

Thanks!

  • Azeroth Main Disable
    • Events
      • Unit - A unit enters Region 043 <gen>
    • Conditions
      • ((Triggering unit) is A ground unit) Equal to True
      • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Azeroth Open Main Gate <gen>
      • Wait 8.00 seconds
      • Trigger - Turn on Azeroth Open Main Gate <gen>
      • Trigger - Turn on (This trigger)
If you are interested in seeing what the other triggers related to this look like, here they are.

  • Azeroth Open Main Gate
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Gate Open Lever 0014 <gen>
      • (Gate (Vertical) 0032 <gen> is dead) Equal to False
    • Actions
      • Trigger - Turn off Azeroth Main Gate Life <gen>
      • Set AzerothMainbreak[1] = (Current life of Gate (Vertical) 0032 <gen>)
      • Destructible - Open Gate (Vertical) 0032 <gen>
  • Azeroth Close Main Gate
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Gate Close Lever 0015 <gen>
      • (Gate (Vertical) 0032 <gen> is dead) Equal to True
      • AzerothMainbreak[1] Not equal to 0.00
    • Actions
      • Trigger - Turn on Azeroth Main Gate Life <gen>
      • Destructible - Close Gate (Vertical) 0032 <gen>
      • Destructible - Set life of Gate (Vertical) 0032 <gen> to AzerothMainbreak[1]
  • Azeroth Main Gate Life
    • Events
      • Destructible - Gate (Vertical) 0032 <gen> dies
    • Conditions
    • Actions
      • Set AzerothMainbreak[1] = 0.00
 
Level 8
Joined
Jan 16, 2008
Messages
156
You are correct. I was incorrect.

This is a bad thing though, none of my triggers leak, yet the map is using more and more system memory as it is is played, what other than trigger leaks could cause this?

I use Vex Optimizer to reduce the filesize of the map, could there be an issue within the optimizer?

Totally stumped. :sad:
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
How about simply using these triggers?

  • Events
    • Whenever a gate needs to be opened (i.e. player 2 selects a unit, or an ability is cast, etc.)
  • Conditions
    • ...
  • Actions
    • Set AzerothMainbreak[1] = (Current life of Gate (Vertical) 0032 <gen>)
    • Destructible - Open Gate (Vertical) 0032 <gen>
    • Trigger - turn off this trigger
    • Wait 8 seconds
    • Trigger - turn on this trigger
  • Events
    • Whenever a gate needs to be closed (i.e. player 2 selects a unit, or an ability is cast, etc.)
  • Conditions
    • ...
  • Actions
    • Destructible - Open Gate (Vertical) 0032 <gen>
    • Set life of Gate (Vertical) 0032 <gen> = AzerothMainbreak[1]
    • Trigger - turn off this trigger
    • Wait 8 seconds
    • Trigger - turn on this trigger
If the gate dies, and it's attempted to be opened, AzerothMainbreak[1] will automatically become 0.00. If it's attempted to be closed, its health is then set to 0.00 and is still dead...

Any other lag you experience must be caused by something else in your map
 
Status
Not open for further replies.
Top