• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] How to make trigger clear message like so

Status
Not open for further replies.
Level 4
Joined
Dec 16, 2013
Messages
84
sorry for my english

how to make trigger like this

Show message: Please pick a hero
Clear "please pick a hero" message to the player who is done picked a hero.

so the "Please pick a hero" message will be still shown to the player who has not pick their hero.

here is my trigger, im so confused haha
  • Buy Hero
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Selling unit) Equal to Tavern 0001 <gen>
    • Actions
      • Unit - Move (Sold unit) instantly to (Random point in Map <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Sold unit)) Equal to (Owner of (Sold unit))
        • Then - Actions
          • Camera - Pan camera for (Owner of (Sold unit)) to (Position of (Sold unit)) over 0.00 seconds
          • Selection - Select (Sold unit) for (Owner of (Sold unit))
          • Camera - Set the camera bounds for (Owner of (Sold unit)) to camera <gen>
        • Else - Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked player) Equal to (Owner of (Sold unit))
            • Then - Actions
              • Cinematic - Clear the screen of text messages for (All players matching ((Picked player) Equal to (Owner of (Sold unit))))
              • Cinematic - Clear the screen of text messages for (All players matching ((Picked player) Equal to (Owner of (Sold unit))))
            • Else - Actions
 
For the first part, you don't even have to use loop, you can just consolidate this even further:

  • Buy Hero
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Selling unit) Equal to Tavern 0001 <gen>
    • Actions
      • Unit - Move (Sold unit) instantly to (Random point in Map <gen>)
      • Camera - Pan camera for (Owner of (Sold unit)) to (Position of (Sold unit)) over 0.00 seconds
      • Selection - Select (Sold unit) for (Owner of (Sold unit))
      • Camera - Set the camera bounds for (Owner of (Sold unit)) to camera <gen>
Since the condition in the loop is literally 1=1... and is unnecessary.

As for clearing messages.... let me figure out something.

edit: Maybe this will work?

  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Sold unit)) Equal to (Picked player)
        • Then - Actions
          • Cinematic - Clear the screen of text messages for (Player group((Picked player)))
        • Else - Actions
I don't really know if it would work by explicitly converting a player into a player group and then allowing it do that way. I'm not even sure if it would cause leaks as well... so someone else will have to reply to that.
 
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Picked player) Equal to (Owner of (Sold unit))
        • Then - Actions
          • Cinematic - Clear the screen of text messages for (All players matching ((Picked player) Equal to (Owner of (Sold unit))))
          • Cinematic - Clear the screen of text messages for (All players matching ((Picked player) Equal to (Owner of (Sold unit))))
        • Else - Actions

>>

  • Cinematic - Clear the screen of text messages for Owner of (Sold unit)
not sure if it will fix it but..
 
> not sure if it will fix it but..

The problem is that the action is only linked to player groups so you can't really make that happen.
 
> If that's the case my solution will work, no? or I am getting the wrong idea?

I meant that there isn't an option to set it to how you did in your post on WE. The only ones are on this image.

That's why I thought what I said will work but I'm not sure as I haven't tested it.
 
I see. I was too lazy to open the editor so that's why. The correct one would be this:

  • Cinematic - Clear the screen of text messages for (Player group((Owner of (Sold unit))))
plan B for me would be the following:
  • Actions
    • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetSoldUnit()) then
    • Custom script: call ClearTextMessages()
    • Custom script: endif
 
Status
Not open for further replies.
Back
Top