Search the Community
Showing results for tags 'sides'.
Found 1 result
-
[Solved] Side and group switching - Respawn System
NumbNutsJunior posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am trying to set the players group to a separate group on side civilian when they are "dead" (alive on island) and then if revived have them rejoin their initial group on side east or west, but the initial group always returns grpNull deleteGroupWhenEmpty - Arguments and effects are global (wiki) ("initPlayerLocal" state) - - "initGroup" properly returns group at this point player setVariable ["initGroup", group player]; // Set the player group even when dead // Make sure group is not deleted when empty if (isGroupDeletedWhenEmpty (group player)) then { (group player) deleteGroupWhenEmpty false; }; (respawn event handler) - - "initGroup" returns grpNull (same result when 'player' is replaced with _unit or _corpse), as if it did not exist anymore params[["_unit", objNull], ["_corpse", objNull]]; if ((isNull _unit) || (isNull _corpse)) exitWith {}; // Set unit to civilian side _deadGroup = createGroup [civilian, false]; [_unit] joinSilent _deadGroup; // ... // Find inital group _initGroup = player getVariable["initGroup", grpNull]; // Set unit to initial group [_unit] joinSilent _initGroup; I simply want to be able to freely return the unit to and from his initial group