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!
Many events do not have a triggering player. Also triggering player does not necessarily mean owner of triggering unit, as some people had to find out the hard way in StarCraft II.
I recommend owner of triggering unit unless you are absolutely certain triggering player returns owner of triggering unit.
Only in PlayerUnitEvents. But there are events where only units are registered without corresponding player, then (Triggering Player) won't work, for example "Enters Region" event.
Only in PlayerUnitEvents. But there are events where only units are registered without corresponding player, then (Triggering Player) won't work, for example "Enters Region" event.
In StarCraft II for some events it is that, for others it means the player who's interaction caused the event to fire. For example if player 2 was to order a unit of player 1 to cast an ability in StarCraft II then the owner of triggering unit is player 1 but triggering player is player 2.
If you want owner of triggering unit then do not short cut with triggering player as it is bad practice and use the full statement instead. Triggering player might be slightly faster, but in practically every situation this is trivial.
"in wc3 triggerPlayer always equal to getOwningPLayer(getTriggerUnit()"
Uhm....
"A player enters a chat message containing the text "bla""
"A player skips a cinematic" (esc)
"A player leaves the game"
"A player presses the left arrow key"
"A player's current gold becomes greater than 300"
"A player changes alliance settings"
GetTriggerUnit() my ass
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.