Search the Community
Showing results for tags 'nearobjects'.
Found 2 results
-
im outputting all near weapons but i have a problem i use forEach (position player nearObjects 999999999) to get all objects with _x but the problem is it shows everything houses etc. i try to filter it only on weapons but that doesnt work. (i found it online) _kids = [(configfile >> "CfgWeapons"),0] call BIS_fnc_returnChildren; _cnt = count kids; _hitName = getText (_kids select 0 >> "name"); if (_x in [_hitName]) then { //output }; Anyone has an idea Thanks anyways
-
I have 3 variables for heli's sarheli0, sarheli1 and sarheli2 imported from the mission. how would I put them into the near objects so I can assign an AI to get in the heli in the trigger zone (script is triggered from another script) this is my code casGroup = _this select 0; casPos = _this select 1; casSpawn = _this select 2; sarheli = _this select 3; sarheli1 = _this select 4; sarheli2 = _this select 5; _heliTypeSearch = casPos nearObjects [['sarheli0','sarheli1','sarheli2'],40]; _heliType = _heliTypeSearch select 0; casSpawn assignAsCargo _heliType; [casSpawn] orderGetIn true; Cheers.