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))
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))
Why is it initially attached to an attachement point and then reattached to the unit? And how exactly does this unit-store text tag work??
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))
Why is it initially attached to an attachement point and then reattached to the unit? And how exactly does this unit-store text tag work??
If you don't reattach it, the text will float at the position during the creation and won't move with the unit.
You can also store the text tag in a variable. That is just another solution to grasp the text with other triggers.
@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: