Jump to content
alezil

HELP: Deleting AI Group.

Recommended Posts

Hi everone.
 

I am making a dialog box that allows the player to select the equipment for him and his team (AI), and choose between certain schedules defined for the beginning of the mission.

In addition, the player would have the option of choosing how many soldiers he would have in his combat group.
 

However, I need a way to delete the remaining soldiers. I needed help to solve the following situation:
 

Suppose I have two groups: Alpha and Bravo.
When alpha activates the trigger, the Bravo group is deleted.
 

It seems that the deleteGroup command does not work while there are members within the group, alive or dead and in the forum I only find tutorials to do the despawn of vehicles with crew.

Could someone tell me how to delete group Bravo?
 

Share this post


Link to post
Share on other sites

{

deleteVehicle _x;

}forEach units Bravo;

deleteGroup Bravo;

 

or

 

{

[_x ] joinSilent grpNull;

}forEach units Bravo;

deleteGroup Bravo;

  • Like 1

Share this post


Link to post
Share on other sites

Thank you.

It worked perfectly, and thanks to that I was able to finish the dialog box.
 

Share this post


Link to post
Share on other sites
17 hours ago, davidoss said:

{

[_x ] joinSilent grpNull;

}forEach units Bravo;

deleteGroup Bravo;


Why would you even suggest that!? This is horrible solution. When you make unit join grpNull, new group is created.

 

[] spawn
{
	for "_i" from 1 to 9 do
	{
		[group player createUnit [typeOf player, position player, [], 0, "NONE"]] join player;
	};

	hint str count allGroups; // 1
	
	sleep 3;
	
	{[_x] joinSilent grpNull} forEach units group player;
	
	hint str count allGroups; // 10!!!!
};

So you delete 1 group but create 10!

*facepalm*

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, killzone_kid said:

Why would you even suggest that!? This is horrible solution. When you make unit join grpNull, new group is created.

 I was not sure if he wants to delete units too or group only.

But nvm its very stupid solution if that creates a group for every joined.

 

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

×