Trigger Leak Question

Status
Not open for further replies.
Level 3
Joined
Dec 8, 2008
Messages
29
Can anyone tell me if this trigger leaks at all? All of the (Player number of (Triggering Player)) is just an index value to make it player specific.

  • Set RushVictim[(Player number of (Triggering player))] = (Target unit of ability being cast)
  • Set RushUnit[(Player number of (Triggering player))] = (Casting unit)
  • Set RushUnitLocation[(Player number of (Triggering player))] = (Region centered at (Position of RushUnit[(Player number of (Triggering player))]) with size (200.00, 200.00))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (RushUnitLocation[(Player number of (Triggering player))] contains RushVictim[(Player number of (Triggering player))]) Equal to False
    • Then - Actions
      • Trigger - Run Crush <gen> (ignoring conditions)
    • Else - Actions
      • Do nothing
 
One leak, when you're setting your rect. You use (...) region centered at (Position of [unit variable]) (...). You should store the location of the unit to a variable previously and then remove it after setting the region.
And one tip, remove the Do nothing action, as it does the same as leaving the else actions empty, but it just uses a bit or memory.
And of course null the units, but i guess you're using those variables in the second trigger, so that the steps i mentioned are done there.

And to that 'player specific' - this is called MPI, Multiple Player Instanceable :)
 
Status
Not open for further replies.
Back
Top