hi. so i am trying to spawn things like ACEbackpacks, earplugs and MORPHINE
but when i try and do so i get errors like
Cannot create non-ai vehicle ACE_COMBAT_PACK,
Cannot create non-ai vehicle ACE_EPINEPHRINE,
Cannot create non-ai vehicle ACE_MORPHINE,
anyone can help here?
the code i am using to do this is ...
might have solved this- problem is that many of the above objects are actually magazines or weapons. my lack of experience is showing again.Code:// for loop determing loot type _arrayO = ["ACE_Flashbang", "TK_ALICE_Pack_EP1", "ACE_Medkit"]; _loottype = floor (random 3);//pistol or mg etc if (_loottype == 0) then { _arrayO = ["ACE_WIRECUTTER", "TK_ALICE_Pack_EP1", "ACE_BBETTY_M", "ACE_Knicklicht_R","ACE_GlassesGasMask_RU","ACE_Medkit","ItemGPS"]; _tPos globalChat format ["Object cache 1"]; }; if (_loottype == 1) then { _arrayO = ["ACE_BANDAGE", "ACE_COMBAT_PACK", "ACE_EARPLUGS","ItemRadio"]; _tPos globalChat format ["Object cache 2"]; }; if (_loottype == 2) then { _arrayO = ["ACE_MORPHINE", "ACE_Flashbang", "PMC_ied_v1", "ACE_Backpack_Wood"]; _tPos globalChat format ["Object cache 3"]; }; _pos1 = _tPos; _randnum = floor (random (count _arrayO)); _objectH = _arrayO select _randnum; _acrate = createVehicle [_objectH, getPos _pos1, [], 0, "NONE"]; _s1 = "USMC_Soldier_Pilot" createVehicle getpos _pos1; // create fake unit // _s1 setpos getPos _pos1; // set him at building pos _s1 setvelocity [0,0,5]; // in case he spawns a little high let him fall (may not be needed) sleep 2; _acrate setpos (_s1 modeltoworld [0,0,0]); //place weapons at his feet. _acrate setDir floor (random (270)); deletevehicle _s1; // remove soldier //Smoke1 = "Smokeshell" createVehicle getPos _tPos; }; if (_chance >70 ) then { Smoke1 = "SmokeshellRed" createVehicle getPos _tPos; }; _c=_c+1; // sleep 1.1; }; // called with _nil = [this] execVM "randammoinbuilding.sqf"
may i take this chance to say that the 6 config browser is very thorough but tricky to browse.
HOME
[FRL]Myke

