• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Text Codes

Status
Not open for further replies.
Level 11
Joined
Jan 23, 2015
Messages
788
  • MonsterKiller
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Monster
    • Actions
      • Game - Display to (All players) the text: The Monster was slaughtered by + (Name of (Owner of (Killing Unit)))!
I want to add the player's name in this text example, but it doesn't works.. I've seen this: (Name of (Triggering Player)) + in some places, but that doesn't work neither.. I've also tried with this (Name of (Player 1 (Red))) Does somebody know all of these codes to show player's gold, name, points(variable) etc etc in a text, or where can I find a list of em?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Hmm... this looks fine, maybe your event/condition is wrong or they are "uncompatible"?

In anycase, add something like:

Create unit for Testing_Player at Some_Point

To check if it is woking at all.

Testing player being the player you are testing with
Some point can be anywhere, use the default, centre of map
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Huh, only for player 1 or what ? If so... huh ? what ? maybe the player name is empty ?

Otherwise I stick to my first post.
Check if the unit is acualy owned by player 12 brown.
Check if teh unit is actualy of type Monster
Check if there IS a killing unit, not killed by triggered damage or if so the damage has a valid unit source.

there isn't much to go wrong in such a simple trigger...
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Ooooooh, I see what you did there now ;)


I believe you just typed the thing into the text box, well it does not work like this.
It is not a text code, it is a concatenated string.

From teh dropdown menu chose "concatenated string"
you should see something like:
string1 + string2
In teh first red string type in "The Monster was slaughtered by"
In teh second red string chose from the dropdown menus the value which you want to turn into text.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Ooooooh, I see what you did there now ;)


I believe you just typed the thing into the text box, well it does not work like this.
It is not a text code, it is a concatenated string.

From teh dropdown menu chose "concatenated string"
you should see something like:
string1 + string2
In teh first red string type in "The Monster was slaughtered by"
In teh second red string chose from the dropdown menus the value which you want to turn into text.

^this is already a very clear explanation. This is what I meant
 
Status
Not open for further replies.
Top