I created the player's name attached to a unit as explained here.
When the unit is a zergling, that's fine. But when it's an ultralisk, the name is not over the head, but somewhere on his belly.
And when you attach the text tag to an attach point of the unit instead of the unit herself, the text don't move.
- You could try to create a function that returns the distances based on the unit as a parameter (-> define a value for each possible unit type which does not use a default distance). So that would be something like:
switch(unit)
case(Ultralisk): return 2.5;
case(Zergling): return 1;
default: return 1.5;
1.5 would be a default value that you can use. It should be the distance which would be used by the most units.
I created the player's name attached to a unit as explained here. When the unit is a zergling, that's fine. But when it's an ultralisk, the name is not over the head, but somewhere on his belly. And when you attach the text tag to an attach point of the unit instead of the unit herself, the text don't move.
So... Is there a way to solve that ?
- You could try to use another attachment point.
- You could try to create a function that returns the distances based on the unit as a parameter (-> define a value for each possible unit type which does not use a default distance). So that would be something like:
switch(unit)
case(Ultralisk): return 2.5;
case(Zergling): return 1;
default: return 1.5;
1.5 would be a default value that you can use. It should be the distance which would be used by the most units.
I thinked about something like that... well, if there's no other way, let's go.
Tried the UI: Name Offset field of the Unit actor?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg