I already have the actions and events of what I want my trigger to do, but currently it allows anyone in the game to do it as long as they know what to do. My question is how do I get the player ID for one specific player and only allow that player to do it. I was thinking it would be a condition to see if the player ID in the trigger equals the one of the triggering player, but I am not sure how to do that. Any help would be appreciated.
I'm not 100% sure what you're asking since you didn't post your trigger, but maybe I can help anyway.
Player IDs in SC2 are literally just an integer. Player 1 is 1, Player 2 is 2, etc. Most likely what you want is a condition: (Triggering Player) == 1 (or whatever player you want).
Welcome to sc2mapster! Feel free to send me a PM if you have any questions or concerns :)
I'm a little bit unclear as to what exactly you mean by "one specific player". If you're referring to one specific player as in "One specific person's account", then the solution is to use player handles. You can use "handle of player" to get a player handle, and check it against the handle you want. Every player's handle is sort of like an ID code that only they have. So if you know a person's handle, you can have the game do something specific for them (for example, you can give yourself a debugging dialog while nobody else can see it).
If you mean "a particular player from that game", then you'll have to be a bit more specific with what you're trying to do exactly. Player numbers are just integers, so you can compare any function that returns an integer (like 'triggering player').
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
To post a comment, please login or register a new account.
I already have the actions and events of what I want my trigger to do, but currently it allows anyone in the game to do it as long as they know what to do. My question is how do I get the player ID for one specific player and only allow that player to do it. I was thinking it would be a condition to see if the player ID in the trigger equals the one of the triggering player, but I am not sure how to do that. Any help would be appreciated.
@CrinklyMilk: Go
I'm not 100% sure what you're asking since you didn't post your trigger, but maybe I can help anyway. Player IDs in SC2 are literally just an integer. Player 1 is 1, Player 2 is 2, etc. Most likely what you want is a condition: (Triggering Player) == 1 (or whatever player you want).
Welcome to sc2mapster! Feel free to send me a PM if you have any questions or concerns :)
I'm a little bit unclear as to what exactly you mean by "one specific player". If you're referring to one specific player as in "One specific person's account", then the solution is to use player handles. You can use "handle of player" to get a player handle, and check it against the handle you want. Every player's handle is sort of like an ID code that only they have. So if you know a person's handle, you can have the game do something specific for them (for example, you can give yourself a debugging dialog while nobody else can see it).
If you mean "a particular player from that game", then you'll have to be a bit more specific with what you're trying to do exactly. Player numbers are just integers, so you can compare any function that returns an integer (like 'triggering player').