• 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.

Broken Event Function? (GUI)

Status
Not open for further replies.
I don't understand.. is this event broken or am I just losing my mind?

Event.png


I can't get the event to work properly.
Don't bother trolling, I know for a fact it's not the actions and there are no conditions in my trigger.

/facepalm
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
Then you are after doing one of the following.
1. Everytime you change owner, you recostruct the trigger and its event.
2. You make the trigger run for everyone but you apply a condition to restrict the code execution to only when it was triggered by the owner player of that unit.

GetTriggeringPlayer should get the person who typed the message. Re evaluating the owner of the unit each run will always make sure it is correct. Comparing the 2 for equality will return if the trigger was run by the owner of the unit. Running code only if it is triggered by the owner of the unit will do exactly what you want.
 
Status
Not open for further replies.
Top