onedigita 17 Posted February 18, 2015 Wanted to know if its possible to create markers that are only visible on say the west side and others only visible on the east Share this post Link to post Share on other sites
jshock 513 Posted February 18, 2015 (edited) Replace "somePositionToSpawnMarker" with something like "getPos unit/object", replace "someMarkerName" with the name of your choosing, as well as the other stuff like icon type and so forth, and where you see "SIDE" replace that with WEST/EAST/INDEPENDENT: [ [ [somePositionToSpawnMarker], { _mrk = createMarkerLocal ["someMarkerName", (_this select 0)]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "hd_warning"; _mrk setMarkerColor "ColorRed"; _mrk setMarkerText "Your Text Here"; } ], "BIS_fnc_call", SIDE, false, false ] call BIS_fnc_MP; Short description of the code: Will call some code (being all the marker creation stuff) on only on the side specified, and because the marker creation line is "createMarkerLocal" it will only create markers for those clients on that side, no one else in the server will see it unless they are on that side. Edited February 18, 2015 by JShock Share this post Link to post Share on other sites
onedigita 17 Posted February 18, 2015 big thanks J, this is to hide posted basic radio chans for all the squads and so opfor incase they got ahold of a radio and they havent previously written them down donot know our exact channels Share this post Link to post Share on other sites
bluecewe 10 Posted February 18, 2015 It is important to note that the precise code for JShock's solution is not persistent in its effect. In other words, were someone to join the mission at a later stage, they would not experience the effects of that code. While altering the isPersistent argument to true would run the code for all players that join the relevant team, you may find it difficult to manage map markers with such a solution. If you were to go down the route of having persistent map markers, you might therefore benefit from implementing a more sophisticated method for persistence. Share this post Link to post Share on other sites
jshock 513 Posted February 18, 2015 It is important to note that the precise code for JShock's solution is not persistent in its effect. In other words, were someone to join the mission at a later stage, they would not experience the effects of that code. While altering the isPersistent argument to true would run the code for all players that join the relevant team, you may find it difficult to manage map markers with such a solution. If you were to go down the route of having persistent map markers, you might therefore benefit from implementing a more sophisticated method for persistence. Correct, thought of that, and there are two solutions: //initPlayerLocal.sqf [ [ [somePositionToSpawnMarker], { if (isNil "someMarkerName") then { _mrk = createMarkerLocal ["someMarkerName", (_this select 0)]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "hd_warning"; _mrk setMarkerColor "ColorRed"; _mrk setMarkerText "Your Text Here"; }; } ], "BIS_fnc_call", SIDE, true, false ] call BIS_fnc_MP; //or also in the initPlayerLocal.sqf if (side player isEqualTo WEST) then { _mrk = createMarkerLocal ["someMarkerName", _somePosition]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "hd_warning"; _mrk setMarkerColor "ColorRed"; _mrk setMarkerText "Your Text Here"; } else { if (side player isEqualTo EAST) then { _mrk = createMarkerLocal ["someMarkerName", _somePosition]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "hd_warning"; _mrk setMarkerColor "ColorRed"; _mrk setMarkerText "Your Text Here"; }; }; The second is probably the better solution anyhow. Share this post Link to post Share on other sites
daneplant 5 Posted July 21, 2015 Ok so I create a file called initPlayerLocal.sqf then add the code above, go to the editor and call it in the Init with what please? Also how would I get the map marker position as above '_Someposition' from the editor or is this not relevant for me to add....sorry for the novice questions! Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 21, 2015 Ok so I create a file called initPlayerLocal.sqf then add the code above, go to the editor and call it in the Init with what please? Also how would I get the map marker position as above '_Someposition' from the editor or is this not relevant for me to add....sorry for the novice questions! You don't need to call initPlayerLocal. It is a "magic" file that is executed by the game automatically. See https://community.bistudio.com/wiki/Event_Scripts Share this post Link to post Share on other sites
daneplant 5 Posted July 21, 2015 You don't need to call initPlayerLocal. It is a "magic" file that is executed by the game automatically. See https://community.bistudio.com/wiki/Event_Scripts Thank you Kingsley for the information, that's great Just one question how would I get the marker placement position would that be from the editor and what format would it be in, thanks in advance. Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 21, 2015 (getMarkerPos "yourMarkerName") is your friend. It will return Position3D (x and y) I think. Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 21, 2015 Position2D** I'm on my phone so I can't edit Share this post Link to post Share on other sites
Kingsley1997 39 Posted July 21, 2015 In that code where it says _somePosition, it's referring to a position array, so that could be getPos player or getMarkerPos "myMarker"... The wiki has loads of documentation on the position stuff Share this post Link to post Share on other sites