Jump to content

soldierXXXX

Member
  • Content Count

    16
  • Joined

  • Last visited

  • Medals

Community Reputation

21 Excellent

About soldierXXXX

  • Rank
    Private First Class
  1. soldierXXXX

    Random Intel Items

    [_x,_intelItems] spawn soldierXXXX_fnc_randomItem; If you use the syntax this way then every unit which it is used for should get random item if they have spare space in their inventory 😉.
  2. soldierXXXX

    Random Intel Items

    Hi. Items which you want to add to inventory won´t have the same class name as they have in editor. In most cases it´s enough if you delete the prefix "Item_" but in some cases the item will have totally different name. I´ve fixed it for you 🙂. I´ve put together a function which should add the possibility for every unit to have some item generated. It´s a bit different aproach than @7erra has, but Arma is a game with a lot of ways to achieve things and every single one of us has its own style 😄. Take a look 🙂.
  3. For anyone interested, here are the defines of exitcodes (or emulated buttons) extracted from defineResincl.inc . Thank you @pierremgi for pointing it out 🙂 . #define IDC_OK 1 #define IDC_CANCEL 2 #define IDC_AUTOCANCEL 3 #define IDC_ABORT 4 #define IDC_RESTART 5 #define IDC_USER_BUTTON 6 #define IDC_EXIT_TO_MAIN 7
  4. soldierXXXX

    Keep createDisplay open

    Hi @sizraide Try this with your original code: // Add UI EventHandler _displayHandler = _display displayAddEventhandler["KeyDown",{ params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"]; private _rewriteKey = FALSE; if (_key == 1) then {systemChat "button esc clicked";_rewriteKey = TRUE;}; _rewriteKey }]; // Remove displayHandler _display displayRemoveEventHandler ["KeyDown", _displayHandler]; I´ve added eventhandler to your created display instead of mission display for the clarity purposes. Just to be sure you might also consider using disableSerialization. I´m not sure if this is actually needed but i personally use it every time i work with scripts that are using UI elements. Let me know if that helped 🙂
  5. Hi again. The code that wrote @Harzach is great 🙂. I like specialy the function that adds interaction to the key 😄 so cool. And i have to correct myself for i thought the function is only available for multiplayer-that is not true it works perfectly fine in SP. IDK why it didn´t work yesterday when i tried it 😄. However one thought got on my mind and that was what if you wanted to create like keybox ? Where you want to have keys for more than one vehicle (assigned keys) and you don´t wish to use civil key as dummy key (to not look so obvious)? Well when i dig deeper into ace code and i figured out if you want to have key registered you only have to register it to object variable ""ace_vehiclelock_customkeys"" and the vehicle lock system takes care of the rest. So i had an idea for such script. It´s also created with Take eventhandler but it could be adjusted for more cars. If you´re interested take a look 🙂. I put this into init.sqf and as i tested it, it should work-keys stays assigned as they were. You can place them on ground, back into furniture or inside cars (sometimes it´s a bit hard to detect which key you actually have). Well you can ignore this post if you want 😄 i just wanted to post it for anyone that might be interested in same thing 🙂. only thing you have to adjust is: c1 addMagazineCargoGlobal ["ACE_key_customKeyMagazine", 3]; c1 setVariable ["availableKeysCars",[car1,car1_1,car1_2]]; where c1 is the furniture, 3 is number of keys to be added and [car1,car1_1,car1_2] is the array for vehicles in order that will get their key registered when you take the keys from furniture. And if you want more units to be able to register the keys, they need to have the same eventhandler and it will work (tested with another playable unit). At the start player has two already registered keys for car1 in his inventory (i wanted to test it if it´s possible to register keys without using ace action and kept it there). //========================================================================================================================================================================================================= //with this you can automaticly assign more than one key that you already have in inventory to unlock car1-great at mission start-usefull when you want to give access to car1 to someone else but you want another key to be able to un/lock it player addMagazine "ACE_key_customKeyMagazine"; player addMagazine "ACE_key_customKeyMagazine"; arrayActiveKeys = [];//this array is most important-needs to be available for both functions-checks all active keys {if (((toLowerANSI _x) find "ace vehicle key") != -1) then {arrayActiveKeys pushBack _x};} forEach (magazinesDetail player);//this registers keys from players inventory //hint str arrayActiveKeys; private _copyArrayActiveKeys = +arrayActiveKeys; car1 setVariable ["ace_vehiclelock_customkeys",_copyArrayActiveKeys];//this syntax setups the keys that player has in inventory for car1 //========================================================================================================================================================================================================= //this is a function to simulate more than one key in furniture-needs to be assigned by Take eventhandler //Be aware that for Multiplayer usage the code would probably need some tweaks (like publicVariable arrayActiveKeys and so on) c1 addMagazineCargoGlobal ["ACE_key_customKeyMagazine", 3];//number of keys should match with availableKeysCars array c1 setVariable ["availableKeysCars",[car1,car1_1,car1_2]];//you can copy this and assign different vehicles for different furnitures f1 addMagazineCargoGlobal ["ACE_key_customKeyMagazine", 2]; f1 setVariable ["availableKeysCars",[b1,b2]]; soldierXXXX_fnc_Get_AddedKey = { private _foundKeys = []; {if (((toLowerANSI _x) find "ace vehicle key") != -1) then {_foundKeys pushBack _x};} forEach (magazinesDetail _this); private _foundNewKeys = []; {if (!(_x in arrayActiveKeys)) then {_foundNewKeys pushBack _x};} forEach _foundKeys; if (_foundNewKeys isNotEqualTo []) exitWith {_foundNewKeys select 0}; ""//returns "" if the key is registered }; soldierXXXX_fnc_ACE_VehLock_TakeEH = { params ["_unit", "_container", "_item"]; private _AddedKey =_unit call soldierXXXX_fnc_Get_AddedKey; if (_AddedKey == "") exitWith {hint "This key is already registered"}; if (_container getVariable ["availableKeysCars",[]] isNotEqualTo []) then {//if the container has unregistered keys available private _currentCarAvailable = _container getVariable "availableKeysCars"; private _currentCar = (_currentCarAvailable select 0); private _currentACEVEHvar = (_currentCar getVariable ["ace_vehiclelock_customkeys",[]]); _currentACEVEHvar pushBack _AddedKey; arrayActiveKeys pushBack _AddedKey; _currentCar setVariable ["ace_vehiclelock_customkeys",_currentACEVEHvar]; _currentCarAvailable deleteAt 0; _container setVariable ["availableKeysCars",_currentCarAvailable]; hint format ["Key taken for:%1\nUnreleased keys available for:%2",_currentCar,(_container getVariable "availableKeysCars")]; }; }; player addEventHandler ["Take", { params ["_unit", "_container", "_item"]; if ((_item isEqualTo "ACE_key_customKeyMagazine")) exitWith { _this spawn soldierXXXX_fnc_ACE_VehLock_TakeEH; }; }]; //============================================================================================================================================================================================================ I´m attaching Uploaded mission (stored for 30 days) . If you interested you can try it 🙂
  6. No that´s not possible. That´s because when using ace_vehiclelock_fnc_addKeyForVehicle with customKey parameter set to TRUE, the script behaves differently (and works only in MP environment). The script works with command magazinesDetail which returns vehicle/unit magazines with their specific ID, but it can´t return magazines from object that can´t shoot (will return [] for objects like civil cars, boxes etc...). Your best bet for making custom key for the car is to add the key directly to player with [player, car1, true] call ACE_VehicleLock_fnc_addKeyForVehicle; and not into furniture.
  7. @SGT Major Ray Jefferson You might be looking for different command. This might do what you're trying to achieve if it's ok that it's just an inventory item and it's not visible ON the furniture. c1 addItemCargo ["ACE_key_civ", 1];
  8. soldierXXXX

    Help with sleep command

    @FenixDK based on your code, you might do it like this: Version without sleep: Advantage of this is that you don´t have to create another file and just call it directly from description.ext . i assume grad_moneymenu_fnc_setFunds is already declared. And there is no need to compare type of unit. XEH does it for you. //description.ext class Extended_InitPost_EventHandlers { class LOP_ISTS_Infantry_SL { class Money_init_eh { init = "[(_this select 0),100] call grad_moneymenu_fnc_setFunds"; }; }; class LOP_ISTS_Infantry_GL { class Money_init_eh { init = "[(_this select 0),25] call grad_moneymenu_fnc_setFunds"; }; }; }; Version with sleep: There is a little more you have to do. Instead of compiling the same file over and over again i would declare it as global variable and spawn it like this. But i´m not sure why you would add money to unit after some time (it just doesn´t make sence to me). But you might use similar aproach in some other code. //money.sqf params ["_unit","_amount"]; sleep 5; [_unit,_amount] call grad_moneymenu_fnc_setFunds; //init.sqf or initPlayerLocal.sqf TAG_fnc_Money = (compile preprocessFileLineNumbers "money.sqf"); //description.ext class Extended_InitPost_EventHandlers { class LOP_ISTS_Infantry_SL { class Money_init_eh { init = "[(_this select 0),100] spawn TAG_fnc_Money"; }; }; class LOP_ISTS_Infantry_GL { class Money_init_eh { init = "[(_this select 0),25] spawn TAG_fnc_Money"; }; }; }; Hope this helps 🙂 .
  9. soldierXXXX

    Image over HUD Issue

    You can solve it by using radius parameter. 🙂 criticalNote = note1 addAction ["Read Critical Information...", {[[_this select 0], "scripts\mission\note\criticalNote.sqf"] remoteExec ["execVM", 0, true];},nil,1.5,true,true,"","true",3,false];
  10. soldierXXXX

    SOLVED Finding UXO's

    Hi again. Yesterday i read few articles and i think i learned something, but i would have to create my own function as addon to see myself how it behaves. At least now i know what you´re trying to achieve. When i thought about it, the function ran in main menu because it was called as mod and there was no restriction present. So i updated the main code and slightly also the search function (global variables were not needed at all). I assume you don´t want your function to end during mission so i removed the restrictions i put earlier. But i decided to keep the debug hints so you can see youself how the function behaves now. It can be simplified even more. Let me know how it works. I´m curious 😄 EODS_MDET_fnc_getNearestUxo = { scriptName "EODS_MDET_fnc_getNearestUxo"; private ["_found", "_nearestUxo", "_DetectionPoint", "_allUxo", "_Uxo", "_distance","_uxoType","_ArrUXOs","_EODVarRadius","_EODVarAngle"]; _uxoType = ["rhsusf_uxo_blu97","BombCluster_03_UXO1_F","BombCluster_02_UXO1_F","BombCluster_01_UXO1_F","BombCluster_03_UXO4_F", "BombCluster_02_UXO4_F","BombCluster_01_UXO4_F","BombCluster_03_UXO2_F","BombCluster_02_UXO2_F","BombCluster_01_UXO2_F", "BombCluster_03_UXO3_F","BombCluster_02_UXO3_F","BombCluster_01_UXO3_F","rhs_uxo_ao1_1","rhs_uxo_ao1_2", "rhs_uxo_ao1_3","rhs_uxo_ptab1m_1","rhs_uxo_ptab1m_2","rhs_uxo_ptab1m_3","rhs_uxo_ptab25ko_1","rhs_uxo_ptab25ko_2", "rhs_uxo_ptab25ko_3","rhs_uxo_ptab25m_1","rhs_uxo_ptab25m_2","rhs_uxo_ptab25m_3","rhs_ammo_uxo_blu97","BombCluster_03_UXO1_Ammo_F", "BombCluster_02_UXO1_Ammo_F","BombCluster_01_UXO1_Ammo_F","BombCluster_03_UXO4_Ammo_F","BombCluster_02_UXO4_Ammo_F", "BombCluster_01_UXO4_Ammo_F","BombCluster_03_UXO2_Ammo_F","BombCluster_02_UXO2_Ammo_F","BombCluster_01_UXO2_Ammo_F", "BombCluster_03_UXO3_Ammo_F","BombCluster_02_UXO3_Ammo_F","BombCluster_01_UXO3_Ammo_F","rhs_ammo_uxo_ao1_1","rhs_ammo_uxo_ao1_2","rhs_ammo_uxo_ao1_3", "rhs_ammo_uxo_ptab1m_1","rhs_ammo_uxo_ptab1m_2","rhs_ammo_uxo_ptab1m_3","rhs_ammo_uxo_ptab25ko_1","rhs_ammo_uxo_ptab25ko_2","rhs_ammo_uxo_ptab25ko_3", "rhs_ammo_uxo_ptab25m_1","rhs_ammo_uxo_ptab25m_2","rhs_ammo_uxo_ptab25m_3" ]; _EODVarRadius = 10; _EODVarAngle = 90; _found = false; _nearestUxo = []; _DetectionPoint = "Helper_Base_F" createVehicleLocal getPos Player; // create detection point _DetectionPoint attachto [player,[-0.4,0.8,-0.8],"granat"]; // attach point to player memorypoint "granat" , we can use "granat2" , "LeftHand" , "RightHand" and maybe "aimPoint".... _allUxo = position player nearObjects ["mineBase",_EODVarRadius]; _ArrUXOs = []; { if (typeOf _x in _uxoType) then {_ArrUXOs pushBack _x}; } forEach _allUxo; for "_i" from 0 to ((count _ArrUXOs) - 1) do { _Uxo = _ArrUXOs select _i; _distance = _DetectionPoint distance _Uxo; if (_distance <= _EODVarRadius) then { if ([getPos player, getDir player, _EODVarAngle, getPos _Uxo] call BIS_fnc_inAngleSector) then { if (_found) then { if ((_nearestUxo select 1) > _distance) then { _nearestUxo = [_Uxo, _distance]; }; } else { _found = true; _nearestUxo = [_Uxo, _distance]; }; }; }; }; detach _DetectionPoint; deleteVehicle _DetectionPoint; _nearestUxo; }; EODS_MDET_fnc_Detector = { scriptName "EODS_MDET_fnc_Detector"; scopeName "DetectorMain"; if (!canSuspend) exitWith {[] spawn EODS_MDET_fnc_Detector};//function needs to run in scheduled environment if (allDisplays isEqualTo [findDisplay 0]) exitWith {};//prevention to not run script in main menu (untested)-might need to add other displays that game loads in main menu (if any other than Display #0) you can find currently running displays with systemChat str allDisplays; if (!hasInterface) exitWith {};//prevention to not run script on dedicated servers or headless clients (untested); waitUntil {sleep 0.5;!isNull player};//function waits until player is ready to play- also JIP protection (untested); while {TRUE} do { if (currentWeapon player in ["EODS_Detector_Weapon", "EODS_VMH3CS_Weapon"]) then { private _NearestUxoResult = call EODS_MDET_fnc_getNearestUxo; //debug-keep sleep command if (_NearestUxoResult isNotEqualTo []) then { systemChat str _NearestUxoResult; private _ShowBomb = "Sign_Arrow_Cyan_F" createVehicleLocal position (_NearestUxoResult select 0);//just for debug _ShowBomb setPos ((_NearestUxoResult select 0) modelToWorld [0,0,0.6]); sleep 3; deleteVehicle _ShowBomb; } else { systemChat "Nothing found"; sleep 3; }; } else { systemChat "you don´t have detector";//also debug sleep 3; }; }; }; //define both functions in CfgFunctions and with EODS_MDET_fnc_Detector set the attribute postInit = 1;(function call itself automaticly) And also, i want to thank @Leopard20 for the tip 🙂.
  11. soldierXXXX

    SOLVED Finding UXO's

    I´m not sure if you need just script for mission or you´re creating a mod ? Well if so, i don´t have experience with creating mods. But i tried to customize the script a little bit. Replace [] spawn part i wrote earlier for this. I assume your script runs in main menu from the begining ? It´s probably not a nice aproach but it should work. I´m sure someone might know better way to do it. 🙂 It works for singleplayer. For multiplayer i think it would need another changes which i´m not sure if i can provide (i´m making mostly singleplayer functions). EODS_MDET_fnc_Detector = { scriptName "EODS_MDET_fnc_Detector"; scopeName "DetectorMain"; if (!canSuspend) exitWith {[] spawn EODS_MDET_fnc_Detector}; waitUntil {sleep 0.1;!isNull findDisplay 46};//waits for mission display; if (isNil "EODS_MDET_fnc_Detector_condition") then { EODS_MDET_fnc_Detector_condition = TRUE; } else { if (EODS_MDET_fnc_Detector_condition) exitWith {systemChat "protection-can´t spawn it twice";breakOut "DetectorMain"}; EODS_MDET_fnc_Detector_condition = TRUE; }; while {!(isNil "EODS_MDET_fnc_Detector_condition")} do { if (!(EODS_MDET_fnc_Detector_condition)) exitWith {systemChat "detection ended";EODS_MDET_fnc_Detector_condition = nil;}; if (isNull findDisplay 46) exitWith {systemChat "detection ended-player is not in mission";EODS_MDET_fnc_Detector_condition = nil;};//if player leaves mission display function ends; if (currentWeapon player in ["EODS_Detector_Weapon", "EODS_VMH3CS_Weapon"]) then { private _NearestUxoResult = call EODS_MDET_fnc_getNearestUxo; //debug-keep sleep command if (_NearestUxoResult isNotEqualTo []) then { systemChat str _NearestUxoResult; private _ShowBomb = "Sign_Arrow_Cyan_F" createVehicleLocal position (_NearestUxoResult select 0);//just for debug _ShowBomb setPos ((_NearestUxoResult select 0) modelToWorld [0,0,0.6]); sleep 3; deleteVehicle _ShowBomb; } else { systemChat "Nothing found"; sleep 3; }; } else { systemChat "you don´t have detector";//also debug sleep 3; }; }; }; [] spawn EODS_MDET_fnc_Detector;//to execute the function spawn this-if it´s mod you´re making you have to implement that somewhere in config (not sure where :D ) //to turn off searching use- EODS_MDET_fnc_Detector_condition = FALSE; or EODS_MDET_fnc_Detector_condition = nil;
  12. soldierXXXX

    SOLVED Finding UXO's

    If you need constant checking do it this way: EODS_MDET_var_radius = 10; EODS_MDET_var_angle = 90; EODS_MDET_fnc_getNearestUxo = { private ["_found", "_nearestUxo", "_DetectionPoint", "_allUxo", "_Uxo", "_distance","_uxoType","_ArrUXOs"]; _uxoType = ["rhsusf_uxo_blu97","BombCluster_03_UXO1_F","BombCluster_02_UXO1_F","BombCluster_01_UXO1_F","BombCluster_03_UXO4_F", "BombCluster_02_UXO4_F","BombCluster_01_UXO4_F","BombCluster_03_UXO2_F","BombCluster_02_UXO2_F","BombCluster_01_UXO2_F", "BombCluster_03_UXO3_F","BombCluster_02_UXO3_F","BombCluster_01_UXO3_F","rhs_uxo_ao1_1","rhs_uxo_ao1_2", "rhs_uxo_ao1_3","rhs_uxo_ptab1m_1","rhs_uxo_ptab1m_2","rhs_uxo_ptab1m_3","rhs_uxo_ptab25ko_1","rhs_uxo_ptab25ko_2", "rhs_uxo_ptab25ko_3","rhs_uxo_ptab25m_1","rhs_uxo_ptab25m_2","rhs_uxo_ptab25m_3","rhs_ammo_uxo_blu97","BombCluster_03_UXO1_Ammo_F", "BombCluster_02_UXO1_Ammo_F","BombCluster_01_UXO1_Ammo_F","BombCluster_03_UXO4_Ammo_F","BombCluster_02_UXO4_Ammo_F", "BombCluster_01_UXO4_Ammo_F","BombCluster_03_UXO2_Ammo_F","BombCluster_02_UXO2_Ammo_F","BombCluster_01_UXO2_Ammo_F", "BombCluster_03_UXO3_Ammo_F","BombCluster_02_UXO3_Ammo_F","BombCluster_01_UXO3_Ammo_F","rhs_ammo_uxo_ao1_1","rhs_ammo_uxo_ao1_2","rhs_ammo_uxo_ao1_3", "rhs_ammo_uxo_ptab1m_1","rhs_ammo_uxo_ptab1m_2","rhs_ammo_uxo_ptab1m_3","rhs_ammo_uxo_ptab25ko_1","rhs_ammo_uxo_ptab25ko_2","rhs_ammo_uxo_ptab25ko_3", "rhs_ammo_uxo_ptab25m_1","rhs_ammo_uxo_ptab25m_2","rhs_ammo_uxo_ptab25m_3" ]; _found = false; _nearestUxo = []; _DetectionPoint = "Helper_Base_F" createVehicleLocal getPos Player; // create detection point _DetectionPoint attachto [player,[-0.4,0.8,-0.8],"granat"]; // attach point to player memorypoint "granat" , we can use "granat2" , "LeftHand" , "RightHand" and maybe "aimPoint".... _allUxo = position player nearObjects ["mineBase",EODS_MDET_var_radius]; _ArrUXOs = []; { if (typeOf _x in _uxoType) then {_ArrUXOs pushBack _x}; } forEach _allUxo; for "_i" from 0 to ((count _ArrUXOs) - 1) do { _Uxo = _ArrUXOs select _i; _distance = _DetectionPoint distance _Uxo; if (_distance <= EODS_MDET_var_radius) then { if ([getPos player, getDir player, EODS_MDET_var_angle, getPos _Uxo] call BIS_fnc_inAngleSector) then { if (_found) then { if ((_nearestUxo select 1) > _distance) then { _nearestUxo = [_Uxo, _distance]; }; } else { _found = true; _nearestUxo = [_Uxo, _distance]; }; }; }; }; deleteVehicle _DetectionPoint; _nearestUxo; }; [] spawn { scriptName "CheckForUXO_script"; CheckActive = TRUE; while {CheckActive} do { private _NearestUxoResult = call EODS_MDET_fnc_getNearestUxo; //debug if (_NearestUxoResult isNotEqualTo []) then { systemChat str _NearestUxoResult; private _ShowBomb = "Sign_Arrow_Cyan_F" createVehicleLocal position (_NearestUxoResult select 0);//just for debug _ShowBomb setPos ((_NearestUxoResult select 0) modelToWorld [0,0,0.6]); sleep 3; deleteVehicle _ShowBomb; } else { systemChat "Nothing found"; sleep 3; }; }; }; I made a small change in the code (replaced ArrUXOs for private _ArrUXOs and changed in _allUxo 10m radius for Variable EODS_MDET_var_radius so you don´t have to rewrite it every time you change variable value 😉 ) If you want to turn off searching for UXOs then write CheckActive = FALSE; either in debug console or your script. EDIT: I don´t think this will affect the script. But, of course i´m not sure what value EODS_MDET_var_rnd_radius has and what function EODS_MDET_fnc_randomize does. Well try the code above and we´ll see 🙂.
  13. soldierXXXX

    SOLVED Finding UXO's

    I found few mistakes and fixed your code. Now it should work properly. Change the variables to fit your needs and let me know if that helped 🙂 EODS_MDET_var_radius = 10; EODS_MDET_var_angle = 90; EODS_MDET_fnc_getNearestUxo = { private ["_found", "_nearestUxo", "_DetectionPoint", "_allUxo", "_Uxo", "_distance","_uxoType"]; _uxoType = ["rhsusf_uxo_blu97","BombCluster_03_UXO1_F","BombCluster_02_UXO1_F","BombCluster_01_UXO1_F","BombCluster_03_UXO4_F", "BombCluster_02_UXO4_F","BombCluster_01_UXO4_F","BombCluster_03_UXO2_F","BombCluster_02_UXO2_F","BombCluster_01_UXO2_F", "BombCluster_03_UXO3_F","BombCluster_02_UXO3_F","BombCluster_01_UXO3_F","rhs_uxo_ao1_1","rhs_uxo_ao1_2", "rhs_uxo_ao1_3","rhs_uxo_ptab1m_1","rhs_uxo_ptab1m_2","rhs_uxo_ptab1m_3","rhs_uxo_ptab25ko_1","rhs_uxo_ptab25ko_2", "rhs_uxo_ptab25ko_3","rhs_uxo_ptab25m_1","rhs_uxo_ptab25m_2","rhs_uxo_ptab25m_3","rhs_ammo_uxo_blu97","BombCluster_03_UXO1_Ammo_F", "BombCluster_02_UXO1_Ammo_F","BombCluster_01_UXO1_Ammo_F","BombCluster_03_UXO4_Ammo_F","BombCluster_02_UXO4_Ammo_F", "BombCluster_01_UXO4_Ammo_F","BombCluster_03_UXO2_Ammo_F","BombCluster_02_UXO2_Ammo_F","BombCluster_01_UXO2_Ammo_F", "BombCluster_03_UXO3_Ammo_F","BombCluster_02_UXO3_Ammo_F","BombCluster_01_UXO3_Ammo_F","rhs_ammo_uxo_ao1_1","rhs_ammo_uxo_ao1_2","rhs_ammo_uxo_ao1_3", "rhs_ammo_uxo_ptab1m_1","rhs_ammo_uxo_ptab1m_2","rhs_ammo_uxo_ptab1m_3","rhs_ammo_uxo_ptab25ko_1","rhs_ammo_uxo_ptab25ko_2","rhs_ammo_uxo_ptab25ko_3", "rhs_ammo_uxo_ptab25m_1","rhs_ammo_uxo_ptab25m_2","rhs_ammo_uxo_ptab25m_3" ]; _found = false; _nearestUxo = []; _DetectionPoint = "Helper_Base_F" createVehicleLocal getPos Player; // create detection point _DetectionPoint attachto [player,[-0.4,0.8,-0.8],"granat"]; // attach point to player memorypoint "granat" , we can use "granat2" , "LeftHand" , "RightHand" and maybe "aimPoint".... _allUxo = position player nearObjects ["mineBase",10]; ArrUXOs = []; { if (typeOf _x in _uxoType) then {ArrUXOs pushBack _x}; } forEach _allUxo; for "_i" from 0 to ((count ArrUXOs) - 1) do { _Uxo = ArrUXOs select _i; _distance = _DetectionPoint distance _Uxo; if (_distance <= EODS_MDET_var_radius) then { if ([getPos player, getDir player, EODS_MDET_var_angle, getPos _Uxo] call BIS_fnc_inAngleSector) then { if (_found) then { if ((_nearestUxo select 1) > _distance) then { _nearestUxo = [_Uxo, _distance]; }; } else { _found = true; _nearestUxo = [_Uxo, _distance]; }; }; }; }; deleteVehicle _DetectionPoint; _nearestUxo; }; private _NearestUxoResult = call EODS_MDET_fnc_getNearestUxo; //debug if (_NearestUxoResult isNotEqualTo []) then { systemChat str _NearestUxoResult; private _ShowBomb = "Sign_Arrow_Cyan_F" createVehicleLocal position (_NearestUxoResult select 0);//just for debug _ShowBomb attachTo [(_NearestUxoResult select 0),[0,0,0.6]];//for some reason to show right position pointer needs to be attached detach _ShowBomb; } else { systemChat "Nothing found"; };
  14. soldierXXXX

    SOLVED Finding UXO's

    Hi. You tried to assign array instead of string so the command did nothing. Try it like this: Nuxos = position player nearObjects ["mineBase",10]; I assigned parent class, so you don´t have to look for every type of UXOs in your array and it automaticly finds all mines in player´s 10m area. If you wish to list only UXOs and not other mines, you could do it like this: uxoType = ["rhsusf_uxo_blu97","BombCluster_03_UXO1_F","BombCluster_02_UXO1_F","BombCluster_01_UXO1_F","BombCluster_03_UXO4_F", "BombCluster_02_UXO4_F","BombCluster_01_UXO4_F","BombCluster_03_UXO2_F","BombCluster_02_UXO2_F","BombCluster_01_UXO2_F", "BombCluster_03_UXO3_F","BombCluster_02_UXO3_F","BombCluster_01_UXO3_F","rhs_uxo_ao1_1","rhs_uxo_ao1_2", "rhs_uxo_ao1_3","rhs_uxo_ptab1m_1","rhs_uxo_ptab1m_2","rhs_uxo_ptab1m_3","rhs_uxo_ptab25ko_1","rhs_uxo_ptab25ko_2", "rhs_uxo_ptab25ko_3","rhs_uxo_ptab25m_1","rhs_uxo_ptab25m_2","rhs_uxo_ptab25m_3" ]; private _Nuxos = position player nearObjects ["mineBase",10]; ArrUXOs = []; { if (typeOf _x in uxoType) then {ArrUXOs pushBack _x}; } forEach _Nuxos; //ArrUXOs now contains only objects near player that you defined in your array uxoType. But there is one important notice. If you placed your UXOs from editor, they change into diferent type. You can find these types in cfgAmmo. That is, if you place UXO, which Editor shows as type "BombCluster_01_UXO4_F", then when you hit play, it changes to "BombCluster_01_UXO4_Ammo_F" and will be ignored in the code above. you can test it with: //insert this code into debug console (or your script) and in editor make a line of UXOs you want to have in your mission each only once (to not deal with duplicates in result array) private _Nuxos = (position player nearObjects ["mineBase",50]) apply {typeOf _x}; systemChat str _Nuxos; copyToClipboard str _Nuxos;//insert result into your uxoType array (remove brackets if you expanding original array) I hope these informations are usefull for you. 🙂
  15. soldierXXXX

    Image over HUD Issue

    @GODSPEEDSNAKE That´s very strange. Just tested it with your original picture and it worked fine for me. So i tried to resize it to 2048x2048 and it also worked. Image size should not be an issue. If it converts correctly, then if you drag your converted image back into textview2, it should automaticly set it to RGBA/none/DXT5. If it won´t, i suggest to try different settings in software you´re using to create/edit your picture. In the end it should look like this . In case, you will not get it to work, i uploaded already converted image in your original size. You can download it here (stored for 30 days) . Let us know if that helped 🙂
×