This forum is going to be locked at the end of this year and eventually going offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Make sure to read the rules.
Make sure to read the rules.
How do I detect 1 Player not all of them?
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
How do I detect 1 Player not all of them?
I need help with detecting 1 player not like Game.GetPlayers(); I need to understand how UniquieID works. Please help fast.
0 x
-
- Superfighter
- Posts: 67
- Joined: Sun Nov 06, 2016 11:34 pm
- Title: Da God
- SFD Account: Jamisco
- SFD Alias: Jamisco
- Started SFD: either late 2015 or early 2016
- Location: Somewhere in the east of the United states
- Gender:
- Age: 104
so each player in the game has a unique ID,for example say they are 6 players in the game, player 1 can will have U-ID 1, player 2 will have U-ID 2 and so on... when you call Game.GetPlayer(Unique-ID), you simply use the player's Id to in sense detect the player.... if you want to get the player's Id, you can do this
additionally, if you are in map editor, you can simply hover over the spawn player icon to get the unique ID ... its called ID not unique ID in map editor
as shown in this picture
Code: Select all
int[] plyr_ID = new int[] { };
int i = 0;
foreach (IPlayer plyr in Game.GetPlayers())
{
plyr_ID[i] = plyr.UniqueID;
i++;
}
as shown in this picture
1 x
Is it better to be feared or respected... please, is it too much to ask for both?