Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
GetLocalPlayer() returns an asyncrnious value.
WC3 is syncrnious, so what is calculated for 1 human playing the map should also be calculated for other humans playing the map.
An asyncrnious value is when the value is different between atleast 2 players in an instance of the game.
GetLocalPlayer()
Returns an asyncrnious player object representing who the owner of the game client is playing.
Only active human players have a game client so can be returned by it.
Player object returned is constant and unique for each game client.
Impossible to get null returned or values in the range of Player(12 to 15) (neutral players).
Using this unique behaviour combined with flow control structures you can run code locally for only specific players. This is great for HCI or graphics which do not affect gameplay but improve the interaction of players with the map. This should never be used to run anything that alters gameplay as it will cause an immediate game split.
Examples
good - Using it to play a sound only for a single player. The sound will only play for certain players.
bad - Using it as the desired owner of a unit. Multiplayer games will instantly disolve (everyone gets dropped from each other).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.