• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Is triggering player bugged?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,290
in wc3 triggerPlayer always equal to getOwningPLayer(getTriggerUnit()
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.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
"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 :D
 
Status
Not open for further replies.
Top