• 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] Destroying Groups Question

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
I know about group leaks a bit.
But I was wondering, do you clean destructible groups the same way as for example; player and unit groups?

So like this:

  • Destructible - Pick every destructible within 256.00 of RandomPoint and do (Actions)
    • Loop - Actions
      • Destructible - Remove (Picked destructible)
EDIT: Above there should be a custom script saying: Bj want to destroy group, but then spelled the correct way ofc.
 
Last edited:
Level 17
Joined
Jun 12, 2007
Messages
1,261
That doesn't destroys it and also player and unit groups aren't destroyed like that.
Watch out for the functions DestroyGroup(udg_GroupVar) and DestroyForce(udg_PlayerGroupVar) ... both require custom scripts ;)

I forgot to add custom script: bj want to destroy group, ( I know u type it different but I find it a pain in the ass to remember.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I don't think there are any destructible groups. As you can see, the "Pick destructible"-actions don't take group as parameter, only region on circle. Therefor they shouldn't leak.

Yes, and it most likely returns a "group" of some sort. Unless it has its own group type which is only initialized and removed inside the function (an array / linked list / whatever), it probably leaks. But Blizzard are hopefully not THAT morons. You can of course just test it with picking lots of destructibles and checking if your game lags or not.
 
Status
Not open for further replies.
Top