• 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] Is this trigger leaking in anything?

Status
Not open for further replies.
Level 6
Joined
Sep 15, 2006
Messages
136
Hi, I'm doing a maze and I want to know that if any of this main trigger are leaking, please help me:wink:

My Out of path-Killing trigger:
dibujopt7.jpg


and my no turn-slide trigger:
dibujo2jv4.jpg




Them are nearly equal, please tell me if ANYthing leak.


.
 
Level 12
Joined
Jun 28, 2008
Messages
688
It is leaking. In the first trigger, if the units ARE owned by Player 12, then the Else actions aren't being run and the group and point aren't being destroyed. Same with the second trigger. To fix this, just move both of the custom script actions to the bottom of the trigger, that way they run no matter what.

And also, in your second trigger, (Punto2 offset by 5.00 towards (Facing of (Picked unit)) degrees) is a seperate point, so you have to store that in a variable and remove it with a custom scirpt, too.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
  • Actions
    • Set Grupo = ...
    • Unit Group - pick every...
      • Loop - actions
        • Set Punto = ...
        • If (All conditions are True)...
          • If - conditions
            • ...
          • Then - actions
            • ...
          • Else - actions
        • Custom script: call RemoveLocation(udg_Punto)
    • Custom script: call DestroyGroup(udg_Grupo)
Punto2 offset by 5.00 towards (Facing of (Picked unit)

Leaks as well. It's not the "Facing of (Picked unit)" that leaks but the total of "Punto2 offset by 5.00 towards (Facing of (Picked unit)" leaks another point so you need 2 point variables for this.
 
Level 12
Joined
Jun 28, 2008
Messages
688
Yeah, you need a variable like "Punto1_2" or something that you set as "Punto offset by 5.00 towards (Facing of (picked unit)) degrees)", then say "Move (Picked unit) instantly to Punto1_2, then remove Punto1_2 later in a custom script.

Do the same in the next trigger, but use Punto2_2 or something.

As for the update you made to the trigger, that works but it looks more efficient if you drag the actions between the "Grupo de unidad" action and the "Bucle: Acciones" action.
That way it gets put in the same Action branch as the first 2 actions. The dotted line should go straight down to them without turning to the right.
 
Status
Not open for further replies.
Top