• 🏆 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!

[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