Name Draw Issue

Posted by Jocke
Heyy i was wondering, i have an issue with name draw.. It's all well drawing when there are 2 players.. but when another player joins the names of the 2 players are drawn on one other player object.. Yet when one Player logs out names are normal again. How do i fix that?

Replies (5)

Last message on 2 Apr 2019

Ryaangu on 29 Mar 2019, 01:55:24
I don't know what you mean, but you can draw player name using that:

obj_player
draw_text(x, y, gms_self_name());



obj_other_player
draw_text(x, y, gms_other_get(player_id, "name"));
Jocke (Topicstarter) on 30 Mar 2019, 12:01:43
Yeah i did that code already, but the problem is when third player joins it displays as other player and his name gets draw in player two
Size43 (Administrator) on 1 Apr 2019, 17:00:03
Where are you drawing the name? If you're drawing it above the other player object like Ryaangu showed, it should display fine for each player.
Jocke (Topicstarter) on 2 Apr 2019, 19:29:46
it is drawn on the other_player object but the thing is when another player joins ( like when there are 2 players and another joins) the names draw on the only one other_player object, while leaving one other_player blank.
Size43 (Administrator) on 2 Apr 2019, 19:32:04
That very much sounds like you might have accidentially set the target of the script/action from 'self' to a specific object.

Alternatively, you might be using [objectname].x and [objectname].y instead of just x and y. That would also always pick the first instance of the object, instead of placing the names above both objects.