What is CTI?
in the init.sqf of first mission I'm defining 2 arrays:
weapon_pool = [];
ammo_pool = [];
i'm using at mission ending a script including:
if (_x hasWeapon "ItemGPS") then {weapon_pool = weapon_pool + ["ItemGPS"]};
removeAllItems _x;
_weps = weapons _x;
_mags = magazines _x;
{weapon_pool = weapon_pool + [_x]} foreach _weps;
{ammo_pool = ammo_pool + [_x]} foreach _mags;
} foreach units igor_team;
savevar "weapon_pool";
savevar "ammo_pool";
And in the following mission:
if (local server) then {
{crate_pool addweaponCargo [_x,1]} foreach weapon_pool;
{crate_pool addMagazineCargo [_x,1]} foreach ammo_pool;
};
crate_pool is an emptied ammo crate placed in the second mission.
when I display the weapons and ammo I want to save to next mission with
hint format ["%1,%2", weapon_pool, ammo_pool]
, I've got the entire both lists at the end of first mission, but these lists are empty in the next one...
How does the "savevar" command works?
How can I get these arrays in the next mission?