• 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 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
 
Level 9
Joined
May 27, 2006
Messages
498
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.
Top