I made [create in-world text]
position : add(event player, vector(0,0,0))
The in-world text is displayed correctly when i go close,
but when i go far the text is displayed up inaccurately
it isn’t definitely correct location.
I hope workshop developers to recognize quickly this problem
error:
imgur.
com/a/oKDWmMM
Could you send a portion of the code please? and are you working on this in the PTR or live?
this action
Create in-world text(event player, string(“hello”,NULL,NULL,NULL), add(event player, vector(0, 0, 0)), 1, clip against surfaces, visible to position and string)
Position wise… it’s based on your event player (I don’t know why you are adding a vector(0,0,0) to event player). so when you move the text moves too.
Do you want the text to be static (staying at one point) or based on where the player is?
position : event player
!=
position : add(event player, vector(0,0,0))
i don’t know why the locations is not same position
it should be same position
Add just adds two variables together, when you add something with zero…
Look, do you want the text to stay in one point or for it to move with the player?
If you want it to stay in one point then remove the add(event player, vector(0, 0, 0)) and use a vector based on the coordination you want it to be at.
I want the text for it to move with the player
and additional text to the event player position
In other words, two [create in-world text]s
one is level , the other is a player name
Position of (Event Player) should help
Remove Add(Event Player, vector(0,0,0)) and put Position of(Event Player) instead… if you need to offset it then
Add(Position of(Event Player), vector(0,2,0)) or something change the values of the vector to change the offset.
Here’s an example:
rule(“Init”)
{
event
{
Ongoing - Each Player;
All;
All;
}
actions
{
Create In-World Text(All Players(All Teams), String("Hello", Null, Null, Null), Player Variable(Event Player, A), 100,
Clip Against Surfaces, Visible To Position and String);
}
}
rule(“Move text”)
{
event
{
Ongoing - Each Player;
All;
All;
}
actions
{
Set Player Variable(Event Player, A, Add(Position Of(Event Player), Vector(0, 2.100, 0)));
Wait(0.001, Ignore Condition);
Loop;
}
}
Not perfect but it works… I’ve gotta get some sleep. Best of luck.
same error i say
it looks up incorrectly on event player position
error:
imgur.
com/a/oKDWmMM
That’s because the in-world text renders to the player’s screen if you hold your fingers over and below in the text and move back and forward you will see the text keeps it’s size relative to the screen itself.
Now unfortunately (after testing a bit) it doesn’t revaluation size so there isn’t much I can do.
The numeric variables in Ovw are what’s known as ‘Floating Point’ numbers. You shouldn’t ever compare them directly as they have accuracy limitations.
You should subtract one from the other, and check that the difference isn’t > some small threshold. If using vectors, do a distance > some small amount.