Jump to content
Sign in to follow this  
SpaydCBR

Group disbanded EH?

Recommended Posts

I'm using the BIS dynamic groups system and was wondering if there's an event handler for when everybody in a group leaves it so that group no longer exists (disbanded). I want to be able to delete objects that were assigned to that group if the group gets disbanded.

Share this post


Link to post
Share on other sites

Thanks, but I don't think I see anything on there that helps me. I want to check if a group doesn't exist anymore.

Share this post


Link to post
Share on other sites

there is some sub functions like 

"GetAllGroups" - Returns all registered and valid groups

should return something , 

 

See BIS_fnc_dynamicGroups in Functions Viewer for more sub-functions and their parameters.

Share this post


Link to post
Share on other sites

I found this in the code for BIS_fnc_dynamicGroups.

/**
	 * Event for player group being disbanded
	 */
	case "OnGroupDisbanded" :
	{
		private ["_group", "_who", "_oldLeader"];
		_group          = _params param [0, grpNull, [grpNull]];
		_who            = _params param [1, objNull, [objNull]];
		_oldLeader      = _params param [2, objNull, [objNull]];

		if (!isNull _oldLeader && {!isNull _who} && {_oldLeader != _who}) then
		{
			[["LocalShowNotification", ["DynamicGroups_GroupDisbanded", [name _oldLeader], _who]], "BIS_fnc_dynamicGroups", _who] call BIS_fnc_mp;
		};

		// Log
		if (LOG_ENABLED) then
		{
			["OnGroupDisbanded: %1 / %2 / %3", _group, _who, _oldLeader] call bis_fnc_logFormat;
		};
	};

It doesn't help me though does it? It looks like it just shows a notification for when a group gets disbanded. I can't run my own code when it happens like for other event handlers right?

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  

×