The unit store text tag stores the text tag so I can access it later. I have a trigger in my map that allows for me to sort of swap my hero with the one I am purchasing, kind of like in your Desert Tankbattle map. I store the text tag so I can delete it with the unit that I replaced and attach a new text tag, otherwise it has issues such as the text tag being stuck over one area and not getting removed. I don't know what trigger you use for your hero swapping, so you may not even need it.
As for attaching it to a point and then to a unit, it's exactly how Zanryu1337 said:
I've confirmed that the text tag will hide if created on enemies through the fog. The tag then appears when we see said enemies. Unfortunately the text tag doesn't hide after we've spotted the enemy after the tag is revealed and we leave the area so the blanket of fog falls on the tagged units.
This is when the text tags created are attached to the units.
I have fixed this and it does not appear to be a problem. Once unit A leaves the sight range of hostile unit B and goes to an area explored by unit B, unit B cannot see the text-tag of unit A. Here are the triggers I used:
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 True
Text Tag - Attach (Last created text tag) to (Last created unit) with height offset 9.0
Text Tag - Set visibility type to Fog Of War for (Last created text tag)
I hope this helps some. Additionally, if you want to store the text-tag, use the following:
Unit - Store text tag (Last created text tag) for unit (Last created unit) at index (Owner of (Last created unit))
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.
@Freddy2287: Go
The unit store text tag stores the text tag so I can access it later. I have a trigger in my map that allows for me to sort of swap my hero with the one I am purchasing, kind of like in your Desert Tankbattle map. I store the text tag so I can delete it with the unit that I replaced and attach a new text tag, otherwise it has issues such as the text tag being stuck over one area and not getting removed. I don't know what trigger you use for your hero swapping, so you may not even need it.
As for attaching it to a point and then to a unit, it's exactly how Zanryu1337 said:
I have fixed this and it does not appear to be a problem. Once unit A leaves the sight range of hostile unit B and goes to an area explored by unit B, unit B cannot see the text-tag of unit A. Here are the triggers I used:
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 True
Text Tag - Attach (Last created text tag) to (Last created unit) with height offset 9.0
Text Tag - Set visibility type to Fog Of War for (Last created text tag)
I hope this helps some. Additionally, if you want to store the text-tag, use the following:
Unit - Store text tag (Last created text tag) for unit (Last created unit) at index (Owner of (Last created unit))
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.