Jump to content
Sign in to follow this  
Minizzzile

Removing Empty Groups

Recommended Posts

Hello, I have a mission that has a spawn point that keeps on spawning units.

At a certain point the spawning will cease because the (Im guessing) group limit of 144 has been reached. Even when all the groups that have been spawned are dead.

SO, is there a way to create a script that removes empty groups so more AI can continue to spawn?

Thank you for your help.

Share this post


Link to post
Share on other sites

Thank you for the quick response.

I have but one question. Do I have to start this up for every group that respawns?

Like I am using the The Undead Mod and it contains a spawning module that randomly selects units out of a list to spawn them at a selected interval. How can I use deleteGroup then?

Share this post


Link to post
Share on other sites

I don't know this mod nor it's spawn module so i can't say any specific about it.

One way to go would be to find a way to add a "killed" Eventhandler to each spawned unit which then calls the deletegroup command. As the BIWIKI says, as long there are some members alive in the group, the command does nothing. So no need to worry about deleting units by mistake.

One way to apply the Eventhandler could be a trigger.

Share this post


Link to post
Share on other sites

mmmmm, I see. So I could have it set up so that in a certain radius it detects empty groups and then removes them?

How would I script/set-up that?

Thank you ahead of time.

Edited by Minizzzile

Share this post


Link to post
Share on other sites

No, you can't detect empty groups since there is nothing to detect. You have to catch the units at the point they get created and there apply the Eventhandler.

As said, i don't know the mod or the spawn module it has. Maybe ask the creator in it's thread where he would suggest to catch new created units. Maybe his module offers a hook-in point for such purposes.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×