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

Fixing Points

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Pharaoh_ was directing you to shorten your code from GetOwningPlayer(GetTriggerUnit()) -> GetTriggerPlayer(), it calls 1 function instead of 2.

In your post #5, you used (Triggering unit) there, that's why Pharaoh_ was directing you to just use GetTriggerPlayer(), it is basically the same.
But if that trigger is meant for (Attacking unit) or something, it cannot use GetTriggerPlayer() as the reference is misleading.

And why did you showed that event ?

Is there something you wanted to say, in a sarcastic way or something @.@"

Be clear.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
InfinateAnswers said:
well get trigger player.... there is no triggering player.. its a triggering unit...

Look at it this way: if the triggering unit is owned by a player and you want to know which player that is, then shouldn't triggering player referr to the player owning the triggering unit?
In other words: it should work...
And not to mention it speeds up your trigger since less function calls are being used to get the player.
 
  • Test
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering player))
      • Game - Display to (All players) the text: (Name of (Triggering unit))
This will display both player name and unit name correctly.
  • Test
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering player))
      • Game - Display to (All players) the text: (Name of (Triggering unit))
This won't.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Its never worked for me before so i assumed it wouldnt work for me now. Only time triggering player has worked for me is with a Player event.

You should try it, now and yes, I'm insist.
A good example is to test out Kobas trigger example.

In the first trigger, 2 message will appear on your screen (your name)

In the second trigger, only one message will appear because (Triggering player) does not work for Unit - Enters Region event.
 
Status
Not open for further replies.
Top