• 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.

Custom Script Question

Status
Not open for further replies.
Level 5
Joined
Jun 17, 2006
Messages
114
the following is some GUI code from my map:

Set point1 = (Random point in worker patrol 1 <gen>)
Unit - Order (Triggering unit) to Patrol To point1

my question is, how do i make sure the points and groups don't cause memory leaks? i tried using the following function:

Custom script: call RemoveLocation (udg_point1)

but the leak checker tells me that local variable point1 has not been removed. can anyone set me straight?
 
Level 5
Joined
Jun 17, 2006
Messages
114
hmmmm well what about this:

random mobs 7
Events
Time - Every 8.00 seconds of game time
Conditions
Actions
Set point1 = (Random point in random mobs 7 <gen>)
Set group1 = (Units owned by Player 12 (Brown) of type Bandit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in group1) Less than or equal to 6
Then - Actions
Unit - Create 1 Bandit for Player 12 (Brown) at point1 facing Default building facing degrees
Else - Actions

would this leak?
 
Status
Not open for further replies.
Top