Quick question about text display

Solu9

You can change this now in User CP.
Reaction score
216
I have no way of testing this myself at the moment. All I want to know is if the Game - Display is only shown for the owner of the triggering unit in this trigger.

Trigger:
  • Note
    • Events
    • Unit - A unit Acquires an item
    • Conditions
    • (Item-type of (Item being manipulated)) Equal to Dagger
    • Actions
    • Game - Display to (All players matching ((Owner of (Hero manipulating item)) Equal to (Owner of (Hero manipulating item)))) the text: You received a Dagger


If that is not the case what would the Game - Display then look like?
 

Tharius

Occasionally Around
Reaction score
39
Your trigger would display the text to every player, not just the owner of that unit. You want something like:

Trigger:
  • Game - Display to (All players matching ((Matching player) Equal to (Owner of (Hero manipulating item)))) the text: You received a Dagger.


The reason your action doesn't work properly is because it's trying to compare each player to something, but lacks any actual comparison. (Owner of (Hero manipulating item)) will always equal (Owner of (Hero manipulating item)), just like 1 will always equal 1. Your comparison doesn't include a "Matching player" value anywhere, so it sees that the one Boolean within it always is true, and says that all the players match. It's like trying to get someone to take all the apples out of a pile of fruit, and when they ask you what type of fruit you want, you say "Yes".
 

Solu9

You can change this now in User CP.
Reaction score
216
Haha I like your example :)
I saw your answer before you posted the explanation. But an explanation is always nice. So thanks.
 

Imp Midna

Active Member
Reaction score
52
Leaks a force though and is kind of ugly. Rather use the blizzards predefined player force array or at least a conversion if you can. (jic someone gets here using the search function)
 

Solu9

You can change this now in User CP.
Reaction score
216
Leaks a force though and is kind of ugly. Rather use the blizzards predefined player force array or at least a conversion if you can. (jic someone gets here using the search function)

I had no idea that display text leaks. Anyway, this will not be that big of a deal in my map.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
It's not the Display Text action itself; it's that you've created a player group. Use the Convert Player to Player Group function.

Trigger:
  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You received a dagger.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top