barto300 13 Posted July 6, 2018 So I want to use markers that are linked to playable characters. My players will be playing characters that live in certain places or know certain things from the start of the mission. They have the ability to choose what kind of character they want to play out of a multitude of characters. However since I have multiple choises of character for the players I do not wish them to know the markers of the characters that are not being played. So how am I able to link these markers to the characters and only let them be show when a character is being controller by a player. TLDR: How do I link a marker to a unit that only shows up when a player is controlling that unit. But the marker has to be visible to everyone. Share this post Link to post Share on other sites
laxemann 1673 Posted July 6, 2018 Hey dude, you're in the wrong section, this is what you're looking for: click. Anyway, the quickest solution I can think of is to put this in your initPlayerLocal.sqf: private _markersToHide = ["ExampleMarker1","ExampleMarker2","ExampleMarker2"]; _markersToHide select { _x setMarkerAlphaLocal 0; }; if (player == NAMEOFUNIT) then { private _markersToShow = ["ExampleMarker1","ExampleMarker2"]; _markersToShow select { _x setMarkerAlphaLocal 1; }; 1 Share this post Link to post Share on other sites
R0adki11 3949 Posted July 6, 2018 1 hour ago, barto300 said: -snip- Thread moved. 1 Share this post Link to post Share on other sites
barto300 13 Posted July 6, 2018 23 minutes ago, laxemann said: Hey dude, you're in the wrong section, this is what you're looking for: click. Anyway, the quickest solution I can think of is to put this in your initPlayerLocal.sqf: Oh snap, Sorry I must've been in the wrong browser tab (Was browsing the forums on multiple tabs) But thanks! I'll try this out asap! 1 1 Share this post Link to post Share on other sites
gokitty1199 225 Posted July 6, 2018 3 hours ago, barto300 said: Oh snap, Sorry I must've been in the wrong browser tab (Was browsing the forums on multiple tabs) But thanks! I'll try this out asap! once you figure out how to get the players you want, heres an example of what i use to mark players on the map, just modify it as needed _color = ([side player, true] call BIS_fnc_sideColor); _name = name player; _group = units group player; _marks = []; { _data = []; _name = name _x; _mark = createMarkerLocal [_name, position _x]; _name setMarkerShapeLocal "ICON"; _name setMarkerTypeLocal "mil_dot"; _name setMarkerTextLocal _name; _name setMarkerPosLocal position _x; _name setMarkerColorLocal _color; _data pushback _name; _data pushback _x; _marks pushback _data; } forEach _group; while {!isNull (findDisplay 12)} do { { _markName = _x select 0; _markPlayer = _x select 1; _markName setMarkerPosLocal position _markPlayer; } forEach _marks; sleep 0.1; }; 1 Share this post Link to post Share on other sites
barto300 13 Posted July 7, 2018 21 hours ago, laxemann said: Hey dude, you're in the wrong section, this is what you're looking for: click. Anyway, the quickest solution I can think of is to put this in your initPlayerLocal.sqf: After testing the code it seems to me that I'm doing something wrong. The chosen markers do dissapear! But whenever I log in with a character for a test run the corresponding markers to that character still remain hidden along with the other markers not linked to that character. Share this post Link to post Share on other sites