Jump to content
Sign in to follow this  
fusion13

How to call a specific player

Recommended Posts

Like how do i call a specific player using _x?

so like

{_x setPos (getMarkerPos "_ranPos")};

? I can't get the _x part I want to move the player when spawning to a random pos, I cant use player setpos because that would move all players

Share this post


Link to post
Share on other sites

/*
* This will search all units in the game and compare their UID.
* Since UID is unique to one individual player it can only be true for one player not multiple
* I used exitWith because once we found the player we are looking for there is no need to keep searching
*/
{
if(getPlayerUID _x == "123456") exitWith 
{
	{
		_x setPos (getMarkerPos "_ranPos");
	};
};
}forEach allUnits;
/*
* It depends on what you want to test or how you want to
* select the specific player. This is just an example how you could 
* retrieve a specific player from an array of players.
*/

Share this post


Link to post
Share on other sites

Its kind of hard to explain but i swore i saw,

_x = this select 0;
_x setPos (getMarkerPos "_ranPos");

I swore i have seen this forgive me if i am wrong

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  

×