• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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