{"name":"ctrlMapMouseOver","operator":null,"title":"ctrlMapMouseOver","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapMouseOver","revid":369404,"updated":"2024-09-03T18:43:23Z","groups":["GUI Control - Map"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.","syntaxes":[{"syntax":"ctrlMapMouseOver control","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":"map control","types":["Control"],"since":null,"text":"control: Control - map control"}],"returns":{"type":"Array","types":["Array"],"description":"possible values: - [\"unit\", Object] - [\"vehicle\", Object] - [\"vehicleGroup\", Object] - [\"object\", Object] - [\"waypoint\", Waypoint] - [\"trigger\", Object] - [\"marker\", String] - [\"task\", Task] - [\"customMark\"]","text":"Array - possible values:\n- [\"unit\", Object]\n- [\"vehicle\", Object]\n- [\"vehicleGroup\", Object]\n- [\"object\", Object]\n- [\"waypoint\", Waypoint]\n- [\"trigger\", Object]\n- [\"marker\", String]\n- [\"task\", Task]\n- [\"customMark\"]"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}}],"examples":[{"text":"```sqf\n(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overFriendly\"];\n\n_mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable \"_map\")) > 0) then\n{\n    ctrlMapMouseOver (uiNamespace getVariable \"_map\")\n}\nelse\n{\n    [\"\"]\n};\n\nif (_mouseover select 0 == \"task\" && str(_logic getVariable \"onTaskAssigned\") != str{}) then\n{\n    //--- Task\n    (uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overMission\"];\n}\nelse\n{\n    //--- Waypoint\n    (uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_move\"];\n};\n```","code":["(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overFriendly\"];\n\n_mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable \"_map\")) > 0) then\n{\n\tctrlMapMouseOver (uiNamespace getVariable \"_map\")\n}\nelse\n{\n\t[\"\"]\n};\n\nif (_mouseover select 0 == \"task\" && str(_logic getVariable \"onTaskAssigned\") != str{}) then\n{\n\t//--- Task\n\t(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overMission\"];\n}\nelse\n{\n\t//--- Waypoint\n\t(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_move\"];\n};"]},{"text":"```sqf\nonEachFrame {hintSilent str ctrlMapMouseOver (findDisplay 12 displayCtrl 51)};\n```","code":["onEachFrame {hintSilent str ctrlMapMouseOver (findDisplay 12 displayCtrl 51)};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["findDisplay","displayCtrl","BIS_fnc_createTooltip"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control - Map","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}