RealLocutus 3 Posted August 13 I hope this is the correct sub forum if not please move. Thanks. We are currently playing on a winter map and on this map the waypoint marker (the one you set with Shift + Leftclick) is hard to see. So my question is there a way to change the color? Maybe with a mod? Thanks. Share this post Link to post Share on other sites
RealLocutus 3 Posted August 17 So I guess there is no way to change it? Share this post Link to post Share on other sites
soldierXXXX 107 Posted August 18 (edited) Hi, we can't change the color directly. There is no access command and the function to create that waypoint marker runs internally. The only way you can achieve something similar is to create function that will draw over it. You can customize it by your needs. Paste the code to initPlayerLocal.sqf or else where the code would run locally. addMissionEventHandler ["MapSingleClick", { params ["_units", "_pos", "_alt", "_shift"]; if !(_shift) exitWith {}; if !(isNil "MyDraw3DMarkersEH") then {removeMissionEventHandler ["Draw3D",MyDraw3DMarkersEH]}; _EH = addMissionEventHandler ["Draw3D", { drawIcon3D ["\a3\3DEN\Data\CfgWaypoints\Move_ca.paa", [1,0,0,1],_thisArgs select 0, 1, 1, 0, "", 1, 0.05, "TahomaB", "center", true]; },[_pos]]; MyDraw3DMarkersEH = _EH; }]; Also, this is just example how can it be done. Don't expect fully working code. For instance the icon will persist if you delete the custom waypoint. Edited August 18 by soldierXXXX 2 Share this post Link to post Share on other sites
major-stiffy 279 Posted August 18 I've always wished there was a way to make this work. Quote For instance the icon will persist if you delete the custom waypoint. Haven't tried what you wrote because of this but it looks like you were soo close. Share this post Link to post Share on other sites
soldierXXXX 107 Posted August 19 10 hours ago, major-stiffy said: I've always wished there was a way to make this work Alright, I'll see what I can do 😉. Share this post Link to post Share on other sites
pierremgi 4853 Posted August 19 Try: addMissionEventHandler ["MapSingleClick", { params ["_units", "_pos", "_alt", "_shift"]; if !(_shift) exitWith {}; if !(isNil "MyDraw3DMarkersEH") then {removeMissionEventHandler ["Draw3D",MyDraw3DMarkersEH]}; _EH = addMissionEventHandler ["Draw3D", { if (customWaypointPosition isNotEqualTo [] ) then { drawIcon3D ["\a3\3DEN\Data\CfgWaypoints\Move_ca.paa", [1,0,0,1],_thisArgs select 0, 1, 1, 0, "", 1, 0.05, "TahomaB", "center", true] }; },[_pos]]; MyDraw3DMarkersEH = _EH; }]; 4 Share this post Link to post Share on other sites
soldierXXXX 107 Posted August 19 Nice one @pierremgi You solved it quicker than I had a chance to get to my PC 😄. I actually like this solution a lot more than the one I had in mind. I wasn't aware that we have a command that retrieves that position, so that makes things a lot simpler 😊. 1 Share this post Link to post Share on other sites
soldierXXXX 107 Posted August 19 Maybe only one thing to improve. If player decides to remove the custom waypoint, remove draw event as well, so the game doesn't have to check the code each frame. When he places new waypoint that event will be always removed anyway, so I see no point in checking that condition further. addMissionEventHandler ["MapSingleClick", { params ["_units", "_pos", "_alt", "_shift"]; if !(_shift) exitWith {}; if !(isNil "MyDraw3DMarkersEH") then {removeMissionEventHandler ["Draw3D",MyDraw3DMarkersEH]}; _EH = addMissionEventHandler ["Draw3D", { drawIcon3D ["\a3\3DEN\Data\CfgWaypoints\Move_ca.paa", [1,0,0,1],_thisArgs select 0, 1, 1, 0, "", 1, 0.05, "TahomaB", "center", true]; //systemChat ("running " + str diag_tickTime);//debug if (customWaypointPosition isEqualTo []) then { removeMissionEventHandler ["Draw3D",MyDraw3DMarkersEH]; //systemChat "Not running";//debug MyDraw3DMarkersEH = nil; }; },[_pos]]; MyDraw3DMarkersEH = _EH; }]; 1 Share this post Link to post Share on other sites
major-stiffy 279 Posted August 19 OMG! This is wonderful. Thanks so much you guys. I mostly play Pilgrimage mod and will update all ported maps to use this. Thanks so much! I plan to put it in the initPlayerLocal.sqf Share this post Link to post Share on other sites