This may be a very simple question but I havent figured out how to deal with it yet.
Is it possible to show the player name of the controling player hovering over the unit? Just over the (always shown) health-bar and of course affected by the fog of war. :)
Have a look at the 'create text tag' actions in the trigger module of the editor. You can use another variable to store the name of the player (if necessary), then use the 'create text tag' action to create the text of the player's name and another trigger action to attach it to whatever unit you want it to be attached to.
Try setting the text tag's visibility to "fog of war". I have no idea if this will work, but I can't see what other purpose that the command would serve!
That is unnecessary. You just have to have the font style code put in before the color..
Simply doing
<s val="Kicker_Minerals">TextWithColor(NameOfPlayer(x),color)</s> will work fine.
there's no need to go through the trouble of setting color codes to variables and using them.
I did something similar with a trigger with the event being game start during a loop that actually spawns the heroes for a player and it worked:
Text Tag - Create a text tag with the text (Text (Name of player (Picked player)) with color (Color((Current player (Picked player) color)))) for (All players), using a font size of 24, at ((Last created unit) attachment point ("Status Bar")) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Text Tag - Attach (Last created text tag) to (Last created unit) with height offset 9.0
Unit - Store text tag (Last created text tag) for unit (Last created unit) at index (Owner of (Last created unit))
The first trigger doesn't actually attach it at the unit but it does create the text tag with the info. The second trigger attaches the text tag to the unit.
This may be a very simple question but I havent figured out how to deal with it yet.
Is it possible to show the player name of the controling player hovering over the unit? Just over the (always shown) health-bar and of course affected by the fog of war. :)
Have a look at the 'create text tag' actions in the trigger module of the editor. You can use another variable to store the name of the player (if necessary), then use the 'create text tag' action to create the text of the player's name and another trigger action to attach it to whatever unit you want it to be attached to.
Edit: not sure about data solutions
I experimenced with that but if I remember right, there were issues regarding the fog of war visibility of enemy heroes-tags!?
[EDIT]Maybe from subform -better for data-editing I guess!? Could somebody move the thread?[/EDIT]
Try setting the text tag's visibility to "fog of war". I have no idea if this will work, but I can't see what other purpose that the command would serve!
Wonderful. This worked. Dont know why I never tried this one :-D thx
[EDIT]Is it right that I cant set a text tag font?[/EDIT]
You can definitely set the font style of a text tag. The normal method works fine.
I really cant see that option for text-tags!? Whats the functions name?
It's not a function. When you enter the text, you just use the style controls like any other text-based entry.
For example;
<s val="AB_Description">Hello</s>
I want to dynamically attach the text... wait.. have an idea. Should work with combine text!? :-D
For whatever reason, the text tag does not accept colors any more when I set the text via
CombineText(<s val="ModCenterSize16Bold">+NameOfPlayer+</s>)
Neither the colored text nor the setTagColor works...
You need to put the color inside the style tags.
Here is my mineral text tag for when you sell a unit in Desert Strike HotS;
<s val="Kicker_Minerals"><c val="40FFFF">+
50
</c></s>
It's done using "combine text", just like yours, where the number value is dynamically generated.
Oh but I dont have the color pre-coded as it is a player color!?
Ypu will need an array listing the players colors. I think there is a trigger function taht retrives the color code for a given player.
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
Of course there is, but the color is simply not applied. Or what do you mean? A separate array? What for?
There is already a specific action for setting the color of a text tag; as well as a convert player color to color function too.
Color tags must be within style tags when used, otherwise they have no effect.
@Mille25: Go
Funny I have no issues at all in just setting the text tag color including even changing the color mid game without having to touch the font.
That is unnecessary. You just have to have the font style code put in before the color..
Simply doing <s val="Kicker_Minerals">TextWithColor(NameOfPlayer(x),color)</s> will work fine. there's no need to go through the trouble of setting color codes to variables and using them.
Great. That worked! thx
I did something similar with a trigger with the event being game start during a loop that actually spawns the heroes for a player and it worked:
Text Tag - Create a text tag with the text (Text (Name of player (Picked player)) with color (Color((Current player (Picked player) color)))) for (All players), using a font size of 24, at ((Last created unit) attachment point ("Status Bar")) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Text Tag - Attach (Last created text tag) to (Last created unit) with height offset 9.0
Unit - Store text tag (Last created text tag) for unit (Last created unit) at index (Owner of (Last created unit))
The first trigger doesn't actually attach it at the unit but it does create the text tag with the info. The second trigger attaches the text tag to the unit.