• 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] Unit Group Leaks

Status
Not open for further replies.
Level 4
Joined
Jun 10, 2007
Messages
46
So, I have a memory leak in my unit groups.

I have a program that tells me to add the script bj_wantDestroyGroup = true to it.

Problem is, I have no idea where to put it. Is this the correct script, and if so, where and how do I add it?
 
Level 32
Joined
Oct 23, 2006
Messages
5,291
Place the custom script immediately before the GUI action that created the leak:

  • Trigger
    • Events
      • Event
    • Conditions
      • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Playable Map Area) and do (Unit - Hide (Picked unit))

[off-topic] [self="http://www.hiveworkshop.com/forums/newthread.php?do=newthread&f=360"]Xesirin introduce yourself to The Hive![/self]

~ Thread moved from Map Development to > Triggers (GUI)
 
Level 4
Joined
Jun 10, 2007
Messages
46
Okay, but what if the check is in the conditions listing? My check is producing the error in my integer checks where

Unit Group(Number of units in (*region*)) = *number*

Is found as a leak, but not in the event section, in the condition segement.

Should I rewrite the trigger as a unit group action in the code, or is there a simpler fix?
 
Level 4
Joined
Jun 10, 2007
Messages
46
Well, nothing is ever easy.... I'll just go ahead and do the rewrites.... I'm not done with the triggers anyways, so starting the fixes early will probably save me the harassment later.

The other problem was that the program told me to put
bj_wantDestroyGroup = true

When the correct statement is
set bj_wantDestroyGroup = true

So that might have hindered me. Thanks for your help!
 
Status
Not open for further replies.
Top