I created a world-text with “event player” as a position :
Create In-World Text(All Players(All Teams), Custom String(“”), Event Player), […], Default Visibility);
The custom text appear at the health bar position and they both move together with the event player, perfect so far.
Now I want to shift my custom text above the health bar so I tried adding a vector like so :
Create In-World Text(All Players(All Teams), Custom String(“”), Event Player + Vector(0, 1.5,0), […], Default Visibility);
But now it doesn’t move with the health bar so I’m confused.
Any tips ? Thanks
EDIT : found a workaround using line breaks, check DK55D
Well, it is in the description:
“The text’s position. If this value is a player, then the text will appear above the player’s head. Otherwise, the value is interpreted as a position in the world.”
I do not think there is a solution.
i think the only problem is that 1.5 is too low, i tried 2.5 and it worked fine and also maybe try update every frame to make it smoother
Then you refer to Position Of(Event Player) which works and is considered to be player’s feet, to make it above a player from feet you need at least offfset the Y component of 2 or greater, the other option is to use Eye Position(Event Player) whch is approximately a player’s head.
2 Likes
Thank you for all for your inputs. Unfortunately none of these solutions worked.
Only Event Player without any modifications parents the world-text to the actual player name tag and healthbar. Doing everything else parents it to the player world pos.
I’d send a video if I could share links but I have a code if anyone wanna see : DK55D
When the character is standing still and doing an emote (for example hello), the nametag moves along. only an unaltered EventPlayer follows it as well.
As a temp workaround I’m simply gonna put it well above and I wish to find a proper cleaner solution soon.
EDIT : I found a solution !
Using line breaks “\n” as saw with the code ATP4N
simply set a global variable as a custom string “\n”
then, in your world text, use Event player as position and add {0} at the end of your string.
{0} being your global variable and here you go, your custom world-text is attached to the player nametag but don’t appear in front of it no more.
Check how I used it with : DK55D