• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Game Text Triggers

Status
Not open for further replies.
Level 3
Joined
Sep 15, 2021
Messages
31
Greetings,

I've made a TD map. I'd like to show players which round they are on.
I kinda know how to make it and works, but here's a thing i can't solve.

as seen in the picture attached, I used "Name of last created" stuff,
This is good 'cause i set 20 same enemy units come out on each round and it only shows the name of 1 enemy unit out of 20.
The problem is on some rounds, I set "a single boss" unit come out with "20 same enemy units" with using different trigger from the one for "20 enemy units"

When it's a round that a boss unit and 20 enemy units come out, the text message only says the name of the boss ('cuz boss comes out 1 second after 20 enemy units so it is the last created unit)


I'd want both's names appear.. WHAT SHOULD I DO?!! Help plz

Sorry for the broken English if you don't understand, plz let me know.

Round Text.png

Rouund 1.png



Round 2.png


Round 3.png
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,578
Do you have some sort of Classification for bosses? If not, you can use passive abilities to act as custom Classifications and add them to all of your boss units in the Object Editor.

Then when it comes time to Display the unit's name you first check to see if it has the Boss Classification ability:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Level of Boss Classification for (Last created unit)) Equal to 0
    • Then - Actions
      • Game - Display to (All players) for 30.00 seconds the text: ...
    • Else - Actions
So we're only displaying the message if the unit DOESN'T have the Boss Classification ability. In other words, if the unit ISN'T a boss.

Boss Classification can be based on an ability like Storm Hammers which has no effect. You can use these abilities to split up all of your units into different classes to make your triggers more efficient and easier to manage.

 
Level 3
Joined
Sep 15, 2021
Messages
31
Do you have some sort of Classification for bosses? If not, you can use passive abilities to act as custom Classifications and add them to all of your boss units in the Object Editor.

Then when it comes time to Display the unit's name you first check to see if it has the Boss Classification ability:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Level of Boss Classification for (Last created unit)) Equal to 0
    • Then - Actions
      • Game - Display to (All players) for 30.00 seconds the text: ...
    • Else - Actions
So we're only displaying the message if the unit DOESN'T have the Boss Classification ability. In other words, if the unit ISN'T a boss.

Boss Classification can be based on an ability like Storm Hammers which has no effect. You can use these abilities to split up all of your units into different classes to make your triggers more efficient and easier to manage.


Okay so I now get it how to give classification for boss
but what if i want boss' name and normal unit's name displayed together? what shoud I do?

Plust Is there any way i can fully see your trigger script?
it is shown like "Game - Display to (All players) for 30.00 seconds the text: ..." and can't see what it says next

P.S.
thanks for letting me know the "how to post your trigger"
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,578
I literally typed "..." in the Text message :p

But it sounds like you want to take advantage of a String array and Integer that keeps track of the current round.

Store all of the strings in the array:
  • Events
  • Map initialization
  • Actions
  • RoundText[1] = "Round 1 started: Kobolds"
  • RoundText[2] = "Round 2 started: Murlocs"
  • RoundText[3] = "Round 3 started: Bandits and Bandit BOSS"

Then whenever a new round starts increase the Round integer and display the appropriate message:
  • Actions
  • Set Variable CurrentRound = CurrentRound + 1
  • Game - Display to (All players) for 30.00 seconds the text: RoundText[CurrentRound]

This is assuming that Rounds are the same for every player in the map. If each player can be on their own Round, so Player 1 could be on Round 3 while Player 2 is on Round 1, then you could use an Array for CurrentRound.
If this was the case you would put the player's number in the [Index] of the array.
Example for Player 4: Set Variable CurrentRound[4] = CurrentRound[4] + 1.
 
Last edited:
Level 3
Joined
Sep 15, 2021
Messages
31
I literally typed "..." in the Text message :p

But it sounds like you want to take advantage of a String array and Integer that keeps track of the current round.

Store all of the strings in the array:
  • Events
  • Map initialization
  • Actions
  • RoundText[1] = "Round 1 started: Kobolds"
  • RoundText[2] = "Round 2 started: Murlocs"
  • RoundText[3] = "Round 3 started: Bandits and Bandit BOSS"

Then whenever a new round starts increase the Round integer and display the appropriate message:
  • Actions
  • Set Variable CurrentRound = CurrentRound + 1
  • Game - Display to (All players) for 30.00 seconds the text: RoundText[CurrentRound]

This is assuming that Rounds are the same for every player in the map. If each player can be on their own Round, so Player 1 could be on Round 3 while Player 2 is on Round 1, then you could use an Array for CurrentRound.
If this was the case you would put the player's number in the [Index] of the array.
Example for Player 4: Set Variable CurrentRound[4] = CurrentRound[4] + 1.
Holy crap! now it totally works fine.
You saved me

Thanks a lot!
 
Status
Not open for further replies.
Top