How do I display a variable in a text output? This could be useful in both regular messages displayed in the subtitle area, dialogue box, or debug message.
What I want to have happen is:
"[player name] has [number of units] in [region name]"
I have all the region names stores in an array of strings (though if you can just display the region name straight from the region variable type, please let me know).
2nd question: How do I retrieve a player's name to display?
2nd: "Name of player" when going through text functions
First: "Text message: (Name of player X) has (Number of living units in unit group (units in Region Y owned by player X matching condition: Excluded: Missile (and the other defaults) in (dunno how to get region name, maybe just create a text variable array with the region names and use an integer variable to find the appropriate region array index)"
For number of units, a function like "Convert integer to text" or something similar might be needed before the whole function i wrote.
First: "Text message: (Name of player X) has (Number of living units in unit group (units in Region Y owned by player X matching condition: Excluded: Missile (and the other defaults) in (dunno how to get region name, maybe just create a text variable array with the region names and use an integer variable to find the appropriate region array index)"
Could you be a bit more specific? The problem I'm having is that I don't know how to display variables (even strings) interspliced with the text in the message. Do I need to use the custom script tab instead of the value tab? If I just pick a function like "player name," it displays fine, but there's no place to put additional text.
If I do need to use the custom script tab, what kind of syntax do I need to use to call functions and variables?
use the function "Combine text multiple", the double click the <text+> for each new text value. Also, don't forget to include spaces before or after certain text values because otherwise you'll get "TheWatcherhas42units inEntire Map"
How do I display a variable in a text output? This could be useful in both regular messages displayed in the subtitle area, dialogue box, or debug message.
What I want to have happen is:
"[player name] has [number of units] in [region name]"
I have all the region names stores in an array of strings (though if you can just display the region name straight from the region variable type, please let me know).
2nd question: How do I retrieve a player's name to display?
Thanks!
2nd: "Name of player" when going through text functions
First: "Text message: (Name of player X) has (Number of living units in unit group (units in Region Y owned by player X matching condition: Excluded: Missile (and the other defaults) in (dunno how to get region name, maybe just create a text variable array with the region names and use an integer variable to find the appropriate region array index)"
For number of units, a function like "Convert integer to text" or something similar might be needed before the whole function i wrote.
Could you be a bit more specific? The problem I'm having is that I don't know how to display variables (even strings) interspliced with the text in the message. Do I need to use the custom script tab instead of the value tab? If I just pick a function like "player name," it displays fine, but there's no place to put additional text.
If I do need to use the custom script tab, what kind of syntax do I need to use to call functions and variables?
use the function "Combine text multiple", the double click the <text+> for each new text value. Also, don't forget to include spaces before or after certain text values because otherwise you'll get "TheWatcherhas42units inEntire Map"
@TheAlmaity: Go
Thanks a ton! :)