Search the Community
Showing results for tags 'createmapmarker'.
Found 1 result
-
Map Marker on Screentoworld Keypress
shrike88 posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Trying to clean up a script running when in a air vehicle using the gunner optics or pilot FLIR optics that on Keypress it will create a mapmarker for wherever I am zeroed on and looking though the targeting pod. I also want the markers to stay until they are deleted from the map. So multiple instances of created markers will be possible. For marking enemy positions etc. for troops for ground or other forces. Limited scripting knowledge. I know i need to retrive a value from screentoworld, then create a map marker on that value. Im assuming i dont need to create the laser marker. any assistance is appreciated. Guessing just work on the value from _wPos and create off of that ? //Place in player init: _this = execVM "target.sqf"; // if ((vehicle player isKindof "FIR_UH80R") or (vehicle player isKindof "111_Ghosthawk_Black") or (vehicle player isKindof "111_Ghosthawk_Sand")) then { //while(true) do { wPos = screenToWorld [0.5,0.5]; hint format["%1",wPos]; }; }; [] spawn { while {IP_LaseTargets} do { waitUntil {(!isNull (laserTarget IP_Main)) && {isNull ((laserTarget IP_Main) getVariable ["IP_LaserTarget", ObjNull])}}; _target = laserTarget IP_Main; _pos = getPosATL _target; _laserTarget = "LaserTargetW" createVehicle _pos; _laserTarget attachTo [_target, [0, 0, 3]]; _target setVariable ["IP_LaserTarget", _laserTarget]; _marker = createMarker[(str(_target)), _pos]; _marker setMarkerShape "ICON"; _marker setMarkerType "mil_destroy"; _marker setMarkerColor "colorRed"; _marker setMarkerText "Laser Target"; // Killed EH workaround. _target spawn { waitUntil {(!alive _this) OR ((damage _this) > 09)}; _laserTarget = _this getVariable ["IP_LaserTarget", ObjNull]; if (!isNull _laserTarget) then { deleteVehicle _laserTarget; _marker = str(_this); deleteMarker _marker; }; }; ["TargetLased"] call bis_fnc_showNotification; waitUntil {isNull (laserTarget IP_Main)}; }; };-
- screentoworld
- createmarker
-
(and 1 more)
Tagged with: