Jump to content
Sign in to follow this  
Pac Man

setMarkerAlphaLocal

Recommended Posts

I've 2 pre-placed editor markers named west_mhq & east_mhq. I wanted to have each marker track a vehicle. However I wanted to set the alpha of the opposite side's marker to 0, so players can't see the oppositions marker. As soon as the markers start to track the vehicles, both of their alpha returns back to 1 (visible). What is a better way I could achieve this?

if (isServer) then {
 while {true} do {
    "west_mhq" setMarkerPos getPos mhqW1;
    "east_mhq" setMarkerPos getPos mhqE1;
     sleep 1;
   };
};

if (!isDedicated) then {
waitUntil {!isNull player};
    switch (side player) do {
      case west:{"east_mhq" setMarkerAlphaLocal 0;};
      case east:{"west_mhq" setMarkerAlphaLocal 0;};
     };

};

Share this post


Link to post
Share on other sites

you could createMarkerLocal on each player instead, then you know for sure they'll only have their proper markers shown.

plus, couldn't it potentially reduce the amount of network traffic updating markers for everybody when a local loop would do the trick? (i dunno)

Share this post


Link to post
Share on other sites

Okay thanks. Doing it a bit differently. Using setmarkerPosLocal in client script seems to work well. Again, thankyou.

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  

×