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

Quick questions about unit groups

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2015
Messages
283
When I use(set group = units within range)
This creates a unit group that needs to be cleaned up or else it will leak

What happens when I add a unit to a group, does this create a new group?
What happens when I delete the group?
Can I still add units to it after I have destroyed it?
Is destroying a group the same as emptying a group?
 
What happens when I add a unit to a group, does this create a new group?
No, nothing new is created. Adding/removing/using a group won't leak. Only creating can.

What happens when I delete the group?
Can I still add units to it after I have destroyed it?
Is destroying a group the same as emptying a group?
Destroy -> the group does not exist anymore -> you can't add/remove/use the group anymore.
Clean -> the group does still exist -> you can use it if neeeded without having to re-create it.
 
Level 7
Joined
Nov 19, 2015
Messages
283
Thanks for that.

I have many triggers that just add/remove units to a unit group
Loop every 0.0X seconds until no unit are in group

Is this effective/ alright to do. I just add/remove units but I don't create any or destroy them.
 
Status
Not open for further replies.
Top