How would you make a text actor/tag? for a building that displays only to the owner of a hero unit that walks within range?
And the text automatically disappears for that player if his hero walks out of range
Basically, I want a Health Fountain, that displays "Health Fountain" Text, to anyone who walks close enough to it, and when someone walks away from it, then the text disappears
any players far away naturally should not be able to see the text
Anyone know how to do this? and if the method uses text actor, text tag, or something else?
You'll have one trigger with a "unit enters region" event, with the region being the area around the fountain. Use a Create Text Tag action with the Players parameter set to Convert Player to Player Group (Triggering Player). You'll probably want to store this in a Text Tag array at the index of Triggering Player for the sake of simplicity. (Use a Set Variable action to store it, and make the Text Tag array global.)
Make another trigger with the "unit leaves region" event using the same region. Add a Destroy Text Tag action and reference that Text Tag array, once again with the index of Triggering Player.
How would you make a text actor/tag? for a building that displays only to the owner of a hero unit that walks within range?
And the text automatically disappears for that player if his hero walks out of range
Basically, I want a Health Fountain, that displays "Health Fountain" Text, to anyone who walks close enough to it, and when someone walks away from it, then the text disappears
any players far away naturally should not be able to see the text
Anyone know how to do this? and if the method uses text actor, text tag, or something else?
You can do it via triggers with a text tag.
You'll have one trigger with a "unit enters region" event, with the region being the area around the fountain. Use a Create Text Tag action with the Players parameter set to Convert Player to Player Group (Triggering Player). You'll probably want to store this in a Text Tag array at the index of Triggering Player for the sake of simplicity. (Use a Set Variable action to store it, and make the Text Tag array global.)
Make another trigger with the "unit leaves region" event using the same region. Add a Destroy Text Tag action and reference that Text Tag array, once again with the index of Triggering Player.
Thanks didn't think of using regions, going to try that out right now!