Jump to content
Sign in to follow this  
hogmason

markers only seen by certain team

Recommended Posts

gday,

just wondering if i can get some help i have a TvT game i am making and each team have the abililty to deploy rally points ( found the script by suicidal )

any way once the rally is deployed a marker is placed on the map.

How would i make the markers only be seen by the corrosponding team like west team only see the west team rally point marker.

marker is setup by

init.

if ((side player) == west) then {server execVM "HOG scripts\player_specific\rally\rallyMLoop.sqf"};
if ((side player) == resistance) then {server execVM "HOG scripts\east\rally\rallyMLoop.sqf"};

now the rally marker files

west

while {alive teleportTo_object} do
{
"rallym" setMarkerPos getPos teleportTo_object;
"rallym" setMarkerShape "ICON";
"rallym" setMarkerType "mil_dot";
"rallym" setMarkerSize [1.0, 1.0];
"rallym" setMarkerColor "ColorGreen";
"rallym" setMarkerText "Rally Point USA";
"rallym" setMarkerDir ((direction teleportTo_object) +90); 

rallyMoved = True; publicVariable "rallyMoved";
waitUntil {!isNil "rallyMoved"};

sleep 1;
};

east

while {alive teleportTo_object} do
{
"rallym" setMarkerPos getPos teleportTo_object;
"rallym" setMarkerShape "ICON";
"rallym" setMarkerType "mil_dot";
"rallym" setMarkerSize [1.0, 1.0];
"rallym" setMarkerColor "ColorRed";
"rallym" setMarkerText "Rally Point Guerillas";
"rallym" setMarkerDir ((direction teleportTo_object) +90); 

rallyMoved = True; publicVariable "rallyMoved";
waitUntil {!isNil "rallyMoved"};

sleep 1;
};

i tried deleting the markers but they are needed for jip players to spawn to i think.

Share this post


Link to post
Share on other sites

Or you could use setMarkerAlphaLocal. And set the value to zero.

Share this post


Link to post
Share on other sites

Yes that, and you need to use publicVariable to trigger some script locally for each player, and the script should choose the markers that match the player side.

Share this post


Link to post
Share on other sites

well i impress my self amazing thanks guys i got it.

Share this post


Link to post
Share on other sites

for future reference if any 1 ealse is making a tvt mission to only let the appropriate team see a marker just add Local

i.e

"rallym" setMarkerPos[b]Local[/b] getPos teleportTo_object;
"rallym" setMarkerShape[b]Local[/b] "ICON";
"rallym" setMarkerType[b]Local[/b] "mil_dot";
"rallym" setMarkerSize[b]Local[/b] [1.0, 1.0];
"rallym" setMarkerColor[b]Local[/b] "ColorGreen";
"rallym" setMarkerText[b]Local[/b] "Rally Point USA";
"rallym" setMarkerDir[b]Local [/b]((direction teleportTo_object) +90); 

Share this post


Link to post
Share on other sites

"Local" is mandatory, but it won't make a single difference if you run the script on every client. You have to run the script only in the clients where you want the marker to be seen, and not in the others.

Share this post


Link to post
Share on other sites

its working for me only east can see the east rally marker and west can only see the west rally marker tested on dedi with several players

would it be working becouse im calling the marker scripts by using

if ((side player) == west) then {server execVM "HOG scripts\player_specific\rally\rallyMLoop.sqf"};

if ((side player) == resistance) then {server execVM "HOG scripts\east\rally\rallyMLoop.sqf"};

Share this post


Link to post
Share on other sites

Yap hogmason, that's doing the trick. The right script is executed in the right client.

Share this post


Link to post
Share on other sites

righto awsome,

so for anyone who stumbles upon this thread looking for how to set markers that only 1 team can see this is how its done.

i likt to keep things tidy and in like a filing order so in your init place

Init

//////////////////////////////////////////
//    help with jip                         //
/////////////////////////////////////////

if ((!isServer) && (player != player)) then
{
 waitUntil {player == player};
 waitUntil {time > 10};
};

//////////////////////////////////////////
//    ?? marker Set Up                  //
/////////////////////////////////////////
[] execVM "scripts\markers\init.sqf";

now scripts\markers\init.sqf


//help with jip
if (!isDedicated && (player != player)) then
{
   waitUntil {player == player};
   waitUntil {time > 10};
};

if ((side player) == west) then {server execVM "scripts\markers\westmarker.sqf"};
if ((side player) == resistance) then {server execVM "scripts\markers\eastmarker.sqf"};


scripts\markers\westmarker.sqf


place your marker in here

scripts\markers\eastmarker.sqf


place your marker in here

hope this helps

you can call the markers.sqf files directly from the init but like i said i like to keep things tidy and orginised.

;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×