Comrades in Arms Discussion Board

Full Version: Bright Shadow - COOP 15
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(01-22-2015, 11:10 AM)alias link Wrote: [ -> ]Yes, both missions tested on dedicated. Thanks man!
Good man. Uploaded.
Loadouts are duplicated in the mission. I had 40 M203's, and 7 medikits. You should really use the safeAddLoadout function Smile
Thanks guys, i don't understand why this problem didn't manifest itself during the tests i had on dedicated with several people.
I'll switch on FHQ loadout script, i will get on your toes AL Smile Thank you in advance!
@Alwarren
If i understood correctly this is how i should use FHQ gear script


in init.sqf



FHQ_fnc_safeAddLoadout = {
    _unit = _this select 0;
    _scriptName = _this select 1;


    if (!local _unit) exitWith {};


    _isHandled = _unit getVariable "FHQ_loadout_handled";
   
    if (isNil "_isHandled") then {
        _unit setVariable ["FHQ_loadout_handled", true, true];
        _unit call compile preprocessFileLineNumbers _scriptName;
    };
};


// wait for player to actually be in mission


if (!isDedicated) then
{
    waitUntil {!(isNull player)};
    waitUntil {alive player};
};






// handle loadout for each unit


if (local unit_name) then {[unit_name, _loadout] call FHQ_fnc_safeAddLoadout;}


Thanks for the feedback!
This should work, provided you do it for each unit, i.e.

{ [_x, _loadout] call FHQ_fnc_safeAddLoadout;} foreach playableUNits;

or something of that nature.
Updated. Same link as in OP.


Changes
- looping script
- gear
- few small changes in triggers and elements on the map
Uploaded.
Pages: 1 2