zagor64bz 1225 Posted November 18, 2020 Hi, as the title suggest, I would like to know if there's a way to get the "square-box" you get when lasing a target from a vehicle/plane, but using the laser-designator on the ground. The desired effect would be: -I lase a target (eg a vehicle), -I get the white square box -the info is passed to an AI plane -a hint says: "target is displayNameOfEnemy" -the square become red to indicate the vehicle has been targeted -BOOM...square goes away when target is destroyed. Is it possible?😋 Share this post Link to post Share on other sites
pierremgi 4743 Posted November 18, 2020 If you don't want to mod a designator, the simplest way seems to me a display (rscTitles on a mod or description.ext), then a draw3D missionEH with conditions on it. Share this post Link to post Share on other sites
zagor64bz 1225 Posted November 18, 2020 7 minutes ago, pierremgi said: If you don't want to mod a designator, the simplest way seems to me a display (rscTitles on a mod or description.ext), then a draw3D missionEH with conditions on it. Thank you, Pierre, I try to stay away from mods so scripting would be the thing. But it seems more complicated than I was expecting. But is worth a try.. how do I achieve that..or where I start ? EDIT: obviously I'm aware of : https://community.bistudio.com/wiki/titleRsc https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler Share this post Link to post Share on other sites
pierremgi 4743 Posted November 18, 2020 Wait a (several) minute(s).... 1 Share this post Link to post Share on other sites
zagor64bz 1225 Posted November 18, 2020 2 minutes ago, pierremgi said: Wait a (several) minute(s).... Take all the time you need man! Share this post Link to post Share on other sites
pierremgi 4743 Posted November 18, 2020 Bah, I made it simple. In initplayerLocal.sqf: addMissionEventHandler ["Draw3D", { if (!isnull laserTarget player) then { private _status = 1; if (side cursorObject in (player call BIS_fnc_enemySides)) then { if !(cursorObject isSensorTargetConfirmed playerSide) then { cursorObject confirmSensorTarget [playerSide, true]; hint parseText format ["<t> the target is a %1<br/>at grid pos %2 </t>",getText (configFile /"cfgVehicles" / typeOf cursorObject / "displayName"),mapGridPosition cursorObject]; }; _status = 0; }; drawIcon3D ["a3\ui_f\data\igui\cfg\targeting\seekerlocked_ca.paa", [1,_status ,_status,1],getPos laserTarget player , 3, 3, 0, "", 0, 0.05, "TahomaB"]; }; }]; 1 Share this post Link to post Share on other sites
zagor64bz 1225 Posted November 18, 2020 1 hour ago, pierremgi said: Bah, I made it simple. In initplayerLocal.sqf: WOW...that was quick! Works like a charm...now I have to find a way to implement this in a "Frankenstein-script" I'm working on, based on the AWESOME @The Real Bunc [RELEASE] Deadly Drone ( AI/Manual Greyhawk) V1.0. He encourages me to make any change I want for my mission needs, as long as he's credited for the "core". So far I came up with this: Spoiler if ((alive uav1)) then { [] spawn { playSound3D ["A3\dubbing_f\modules\supports\cas_heli_request.ogg", player]; sleep 5; playSound3D ["A3\dubbing_f\modules\supports\uav_acknowledged.ogg", player]; _playerGrp = group uav1; deleteWaypoint [_playerGrp, 1]; _wp =_playerGrp addWaypoint [position player, 0]; _wp setWaypointType "LOITER"; _wp setWaypointLoiterRadius 1000; _wp setWaypointSpeed "FULL"; _wp setWaypointBehaviour "AWARE"; uav1 flyInHeight 2000; hint "VOLTURE 1-1 IS MOVING ON POSITION....KEEP TIGHT!"; }; }; waitUntil { ((alive uav1)) && ((uav1 distance player) <= 2500) && triggerActivated drone_trigg; }; start = { removeallactions player; player addAction ["<t size='1.5' shadow='2' color='#ffff00'>DRONE OPTIONS:</t>", moptions, [], 6, false, true, "", ""]; }; moptions = { removeallactions player; player addAction ["<t size='1.5' shadow='2' color='#00cc00'> ON STANDBY</t>", o1, [], 4, false, true, "", ""]; player addAction ["<t size='1.5' shadow='2' color='#ff9900'> MANUAL FIRE</t>", o2, [], 3, false, true, "", ""]; player addAction ["<t size='1.5' shadow='2' color='#cc3300'> AUTO TARGET</t>", o3, [], 2, false, true, "", ""]; player addAction ["<t size='1.5' shadow='2' color='#3366cc'>DISMISS DRONE</t>", o4, [], 1, false, true, "", ""]; }; o1 = { uav1 setvariable ["Mode","STANDBY"]; call start; }; o2 = { uav1 setvariable ["Mode","DESIGNATE"]; call start; }; o3 = { uav1 setvariable ["Mode","AUTO"]; call start; }; o4 = { removeAllActions player; uav1 setBehaviour "SAFE"; uav1 setCombatMode "BLUE"; hint ""; }; call start; params ["_drone","_rearmDelay","_weapon","_info"]; _drone setVariable ["Mode","STANDBY"]; while {alive _drone} do { if (_drone ammo _weapon == 0) then { if (_info == "true") then {hint "Rearming...Wait";}; sleep _rearmDelay; _drone setvehicleAmmo 1; }; if (_drone getVariable "Mode" == "AUTO") then { if (_info == "true") then {hint "AUTO TARGET ON";}; sleep 3; if (_info == "true") then {hint "SCANNING FOR TARGETS...";}; sleep 6; myNearestEnemy = _drone findNearestEnemy _drone; if (!isNull myNearestEnemy) then { _drone lockCameraTo [myNearestEnemy, [0]]; _drone doTarget myNearestEnemy; _drone doWatch myNearestEnemy; if (_info == "true") then {hint "TARGET ACQUIRED...RELEASING ORDNANCE IN 3..2..1";}; _drone fireAtTarget [myNearestEnemy,"Laserdesignator_mounted"]; sleep 1; _drone fireAtTarget [myNearestEnemy,_weapon]; if (_info == "true") then {hint "ORDNANCE DROPPED!!!!";}; sleep 10; _drone fireAtTarget [myNearestEnemy,"Laserdesignator_mounted"]; }; }; if (_drone getVariable "Mode" == "DESIGNATE") then { if (_info == "true") then {hint "SEND TARGET...";}; sleep 2; if (_info == "true") then {hint "KEEP LASER ON TARGET...";}; sleep 3; targetsarray = _drone targets [true, 3000]; index = targetsarray findIf {TypeOf _x =="lasertargetW"}; if (index>=0) then { myNearestEnemy = targetsarray select index; _drone lockCameraTo [myNearestEnemy, [0]]; _drone doTarget myNearestEnemy; _drone doWatch myNearestEnemy; if (_info == "true") then {hint "TARGET ACQUIRED...RELEASING ORDNANCE IN 3..2..1";}; sleep 1; _drone fireAtTarget [myNearestEnemy,_weapon]; sleep 2; if (_info == "true") then {playSound3D ["A3\dubbing_f\modules\supports\artillery_acknowledged.ogg", player];}; sleep 6; }; }; if (_drone getVariable "Mode" == "STANDBY") then { if (_info =="true") then {hint "VOLTURE 1-1 AWAITING ORDERS...";}; //_drone lockCameraTo [[position uav1 select 0, position _drone select 1,0], [0]]; sleep 2; _drone setBehaviour "SAFE"; _drone setCombatMode "BLUE"; } }; This will -move the drone in your AO if you don't have the UAV terminal in your inventory or you don't want the player to have one, for some reason. -wait for the drone to be in your AO and the script is starting -an addAction will be available with 4 options: -STANDBY MODE -MANUAL FIRE -AUTO TARGET -DISMISS DRONE (just in case you want things to quiet down😛) In the end, I have to insert your script in there, for this result: In manual fire mode, when I lase the target, I get the square and the UAV reply with "Target is whatever at whatever grid...engaging!" Anyway, really REALLY thank you, Pierre! Complete credits are due, clearly. EDIT: I HAD IT WORKING WITH: Spoiler if (_drone getVariable "Mode" == "DESIGNATE") then { if (_info == "true") then {hint "SEND TARGET...";}; sleep 2; if (_info == "true") then {hint "KEEP LASER ON TARGET...";}; sleep 3; targetsarray = _drone targets [true, 3000]; index = targetsarray findIf {TypeOf _x =="lasertargetW"}; if (index>=0) then { myNearestEnemy = targetsarray select index; _drone lockCameraTo [myNearestEnemy, [0]]; _drone doTarget myNearestEnemy; _drone doWatch myNearestEnemy; if (_info == "true") then {hint parseText format ["<t> the target is a %1<br/>at grid pos %2...ENGAGING!!! </t>",getText (configFile /"cfgVehicles" / typeOf cursorObject / "displayName"),mapGridPosition cursorObject];}; sleep 1; _drone fireAtTarget [myNearestEnemy,_weapon]; sleep 2; if (_info == "true") then {hint "MISSILE FIRED!";}; sleep 6; }; }; 3 Share this post Link to post Share on other sites
zagor64bz 1225 Posted November 18, 2020 Here it is in all his glory @pierremgi...thank you again. 1 1 Share this post Link to post Share on other sites