daskunk 1 Posted August 19, 2013 (edited) I have searched how to do this and found similar scripts but none seem to work I need it to work on a dedicated server. Any help would be most appreciated. i want only the sides to be able to see their markers srvc 1&2 are west srvc 3&4 are east. What I have if (!isDedicated) then { {_x setMarkerAlphaLocal 0} forEach ["srvc1","srvc2","srvc3","srvc4"]; waitUntil {!isNull player}; switch (side player) do { case WEST: { {_x setMarkerAlphaLocal 1} forEach ["srvc1","srvc2"]; }; case EAST: { {_x setMarkerAlphaLocal 1} forEach ["srvc3","srvc4"]; }; }; Skunk Edited August 19, 2013 by DaSkunk typos Share this post Link to post Share on other sites
kylania 568 Posted August 19, 2013 Createmarkerlocal the markers instead of putting them on the map. Share this post Link to post Share on other sites
daskunk 1 Posted August 19, 2013 Kylania ty for your reply. According to wiki I need to do this _markerstr = createMarker["markername",[_Xpos,_Ypos]]; _markerstr setMarkerShape "ICON"; "markername" setMarkerType "DOT"; how do i then do what you said and make them local Kylania ? And what/how do I define the position of the markers. I have trigger areas to start a service script. Share this post Link to post Share on other sites
mikie boy 18 Posted August 19, 2013 you create them local to begin with - createmarker command makes then visible to all - i.e the effects of that command are global and broadcasted to everyone createmarkerlocal only creates the marker locally - not broadcasted to everyone since you are not running this script on the server and making one marker which is broadcasted, you are running it on all computers so they all make the said markers locally on their computers - if that makes sense Share this post Link to post Share on other sites
kylania 568 Posted August 19, 2013 What kind of markers are they? Colors, shape, size, do they say anything? All that. :) Share this post Link to post Share on other sites
daskunk 1 Posted August 19, 2013 ok they are markers from the list in markers service - blufor, square for vehicle and triangle for air. srvc1 is air srvc2 is veh (blufor) srvc3 srvc 4 are air - veh (opfor) They say Air Service Area & Vehicle Service Area for both sides ty again for your help. Im trying to understand this :) Share this post Link to post Share on other sites
cuel 25 Posted August 19, 2013 Your code doesn't work?¨ Edit: You haven't closed the switch with a }; Share this post Link to post Share on other sites
daskunk 1 Posted August 20, 2013 I found / came across the code while searching for side markers, i modified the marker names only, as i don't really understand how to do the code. Share this post Link to post Share on other sites
kylania 568 Posted August 20, 2013 Place your 4 empty markers, svc1 through svc4 where you want the spots to be, then this in your init.sqf: if (side player == blufor) then { _mkrBsvc = createMarkerLocal ["mkrBsvc", getMarkerPos "svc1"]; _mkrBsvc setMarkerColorLocal "ColorBlufor"; _mkrBsvc setMarkerShapeLocal "ICON"; _mkrBsvc setMarkerTypeLocal "b_service"; _mkrBsvc setMarkerTextLocal " - Ground Service"; _mkrBair = createMarkerLocal ["mkrBair", getMarkerPos "svc2"]; _mkrBair setMarkerColorLocal "ColorBlufor"; _mkrBair setMarkerShapeLocal "ICON"; _mkrBair setMarkerTypeLocal "b_air"; _mkrBair setMarkerTextLocal " - Air Service"; } else { _mkrOsvc = createMarkerLocal ["mkrOair", getMarkerPos "svc3"]; _mkrOsvc setMarkerColorLocal "ColorOpfor"; _mkrOsvc setMarkerShapeLocal "ICON"; _mkrOsvc setMarkerTypeLocal "o_service"; _mkrOsvc setMarkerTextLocal " - Ground Service"; _mkrOair = createMarkerLocal ["mkrOsvc", getMarkerPos "svc4"]; _mkrOair setMarkerColorLocal "ColorOpfor"; _mkrOair setMarkerShapeLocal "ICON"; _mkrOair setMarkerTypeLocal "o_air"; _mkrOair setMarkerTextLocal " - Air Service"; }; 1 Share this post Link to post Share on other sites
daskunk 1 Posted August 20, 2013 Excellent that worked great. And now i understand the code, thank you very much for your help and patience. Share this post Link to post Share on other sites
kylania 568 Posted August 20, 2013 Happy to help. :) Share this post Link to post Share on other sites
cuel 25 Posted August 20, 2013 I found / came across the code while searching for side markers, i modified the marker names only, as i don't really understand how to do the code. I can't quote it atm but the switch statement is missing }; 2nd line from the bottom. ---------- Post added at 02:16 AM ---------- Previous post was at 02:15 AM ---------- Which makes the script not work but won't spit out any error. Share this post Link to post Share on other sites
daskunk 1 Posted August 20, 2013 (edited) I can't quote it atm but the switch statement is missing }; 2nd line from the bottom. Which makes the script not work but won't spit out any error. Bang on m8 tyvm that works also. :) Amended Code Below if (!isDedicated) then { {_x setMarkerAlphaLocal 0} forEach ["svc1","svc2","svc3","svc4"]; waitUntil {!isNull player}; switch (side player) do { case WEST: { {_x setMarkerAlphaLocal 1} forEach ["svc1","svc2"]; }; case EAST: { {_x setMarkerAlphaLocal 1} forEach ["svc3","svc4"]; }; }; }; Edited August 20, 2013 by DaSkunk amended code Share this post Link to post Share on other sites
mechatoine 10 Posted August 19, 2014 Hi all, I kind of need help for a similar scenario I am trying to create. I have tried to inspire myself from your examples above but nothing seems to be doing it. So I created a small area trigger for BLUFOR which has this code: if (side player = blufor) then { _mkrExt1 = createMarkerLocal ["mkrExt1", getMarkerPos "ext1"]; _mkrExt1 setMarkerColorLocal "ColorBlufor"; _mkrExt1 setMarkerShapeLocal "ICON"; _mkrExt1 setMarkerTypeLocal "hd_pickup"; _mkrExt1 setMarkerTextLocal " Extraction point 1"; _mkrExt2 = createMarkerLocal ["mkrExt2", getMarkerPos "ext2"]; _mkrExt2 setMarkerColorLocal "ColorBlufor"; _mkrExt2 setMarkerShapeLocal "ICON"; _mkrExt2 setMarkerTypeLocal "hd_pickup"; _mkrExt2 setMarkerTextLocal " Extraction point 2"; _mkrExt3 = createMarkerLocal ["mkrExt3", getMarkerPos "ext3"]; _mkrExt3 setMarkerColorLocal "ColorBlufor"; _mkrExt3 setMarkerShapeLocal "ICON"; _mkrExt3 setMarkerTypeLocal "hd_pickup"; _mkrExt3 setMarkerTextLocal " Extraction point 3"; }; And it keeps telling me I need a ";" I'm quite frankly lost here. The idea is that i have 3 invisible markers named ext1, ext2 and ext3 that are invisible and I would like to create 3 markers VISIBLE ONLY TO BLUFOR out of their positions. I am very new to scripting in general. Thank you! Share this post Link to post Share on other sites
Jona33 51 Posted August 19, 2014 the first line should be if (side player==West) then { In ARMA = is used when modifying something, e.g. _a=0, while when checking for an equal value == is used. 1 Share this post Link to post Share on other sites
mechatoine 10 Posted August 19, 2014 the first line should be if (side player==West) then { In ARMA = is used when modifying something, e.g. _a=0, while when checking for an equal value == is used. The missing link :P the "==" Thank you so much! Everything works as intended now ;) Share this post Link to post Share on other sites
Jona33 51 Posted August 19, 2014 The missing link :P the "==" Thank you so much! Everything works as intended now ;) Awesome, glad I could help. Share this post Link to post Share on other sites
Theo Thalwitzer 4 Posted October 7, 2020 On 8/19/2014 at 9:14 AM, mechatoine said: The missing link 😛 the "==" Thank you so much! Everything works as intended now 😉 That works nice but it seems a lot of code for a simple task. This might also work: - Place your (empty) markers where you want them to be in the editor. - Change their color and text to what you would like them to be inside the marker edit-boxes. Now put the following into your script or trigger: if (side player==WEST) then { myMarkers=["mkrExt1","mkrExt2","mkrExt3"]; {_x setMarkerTypeLocal "hd_pickup";} forEach myMarkers; }; This does exactly the same as above but with only 2 lines of code... Line 1 creates an array called myMarkers from your placed markers. Line 2 simply changes the type. Hope that helps Share this post Link to post Share on other sites