01-22-2015, 02:04 PM
Staying compatible with MP and SP, part I
In MP, playableUnits returns all units that can be played. In SP, this returns an empty array and instead switchableUnits should be used.
So in essence, to stay compatible, use this line whenever you would use either playableUnits or switchableUnits:
This can also be used in other constructions:
In MP, playableUnits returns all units that can be played. In SP, this returns an empty array and instead switchableUnits should be used.
So in essence, to stay compatible, use this line whenever you would use either playableUnits or switchableUnits:
Code:
_units = (if (isMultiplayer) then {playableUnits} else {switchableUnits})
This can also be used in other constructions:
Code:
{
_x setCaptive true;
_x moveInCargo myVehicle;
} foreach (if (isMultiplayer) then {playableUnits} else {switchableUnits})