I'm trying to figure out how to have this randomly search for more then just one item like in static buildings and wreaks I list listed. Here is what I have so far, but it only gives one random item per search.
if (_canSearch) then {
sleep 2;
systemChat ("Searching...");
sleep 2;
systemChat ("Searching...");
player playActionNow "PutDown";
player addMagazine _loot;
titleText [format["Sweet, I found something!!!"] , "PLAIN DOWN", 1];
Question
Reaper5150
I'm trying to figure out how to have this randomly search for more then just one item like in static buildings and wreaks I list listed. Here is what I have so far, but it only gives one random item per search.
disableSerialization;
private["_canSearch","_loot"];
_canSearch = count nearestObjects [_playerPos, ["LADAWreck","hiluxWreck","datsun01Wreck","datsun02Wreck","SKODAWreck","UAZWreck","UralWreck","Land_Shed_W02","Land_Shed_M03"], 4] > 0;
_loot=["ItemSodaPepsi",
"ItemBandage",
"FishCookedTrout",
"FoodBeefCooked",
"ItemSodaMdew",
"Attachment_Kobra",
"ItemBriefcase100oz",
"ItemGoldBar",
"ItemKiloHemp",
"ItemRuby",
"PartGeneric",
"PartWheel",
"PartGlass",
"PartEngine",
"ItemAntibiotic",
"ItemFuelBarrel",
"ItemFuelcan",
"ItemHotwireKit",
"Skin_CZ_Soldier_Sniper_EP1_DZ"] call BIS_fnc_selectRandom;
if (_canSearch) then {
sleep 2;
systemChat ("Searching...");
sleep 2;
systemChat ("Searching...");
player playActionNow "PutDown";
player addMagazine _loot;
titleText [format["Sweet, I found something!!!"] , "PLAIN DOWN", 1];
};
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now