• 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] My trigger have memory leak?

Status
Not open for further replies.
Level 2
Joined
Apr 22, 2007
Messages
16
Events
Every 15.00 seconds of game time

Conditions

Actions
Unit Group - Pick every unit in (Units owned by Hostile) and do (Actions)
Loop actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Percentage life of (Picked unit)) Equal 50.00

Then - Actions
Custom script: set by_wantDestroyGroup = true
Set horo_go_fight = (Random point in (playable map area))
unit - Order (Picked unit) to attack to move horo_go_fight
Custom script: call RemoveLocation(udg_horo_go_fight)

Else - Actions
Do nothing
Custom script: call RemoveLocation(udg_horo_go_fight)
 
Level 7
Joined
Jun 4, 2006
Messages
127
Thats

  • Poop
    • Events
      • Time - Every 15.00 seconds of the game
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup
      • Unit Group - Pick every unit in (units owned by (Hostile)) and do (Actions)
        • Loop - Actions
          • If (All conditions) are true then do (Actions), else do (Else Actions)
            • If - Conditions
              • (Percentage Life of (Picked Unit)) LESS THAN or equal to 50.00
            • Then - Actions
              • Set horo_go_fight = (Random point in (Playable Map Area))
              • Unit - Order (Picked unit) to attack-move to horo_go_fight
              • Custom script: call RemoveLocation(udg_horo_go_fight)
            • Else - Actions
              • Custom script: call RemoveLocation(udg_horo_go_fight)
Just a question..

If you intended the condition to ONLY be 50.00 percent, then it will only occur WHEN his life is 50.00% but not (and less) or (and greater)
 
Level 2
Joined
Apr 22, 2007
Messages
16
If i use Less than or equal 50.00 will memory leaks?
because this trigger not for one unit (about 20~50 units).
 
Level 7
Joined
Jun 4, 2006
Messages
127
No it will not, the only thing that will create leaks are points(call RemoveLocation), both unit and player groups(call DestroyForce/Group or set bj_wantDestroyGroup = true ~ for UG only) and some things that I have already forgotten (due to the fact that I quit mapping from June until now..)
 
Status
Not open for further replies.
Top