Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 1,012 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Text above head of entity #320669
04/23/10 17:12
04/23/10 17:12
Joined: Jun 2008
Posts: 428
Rasch Offline OP
Senior Member
Rasch  Offline OP
Senior Member

Joined: Jun 2008
Posts: 428
Hi there,

currently i´m thinking about how to create text above a entitys head. It shall be for showing the name. I dont want to use TEXT and vec_to_screen. I thought about creating a bmap and write the single characters of the name in it than create it above entitys head and move it with it.

But i really don´t find a solution how to write text into a bmap from a string.

Do you have some good ideas for me? laugh

Greets

Re: Text above head of entity [Re: Rasch] #320671
04/23/10 17:29
04/23/10 17:29
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
You can use a 3d model that is a simple plane. Then you can use a Panel, with a digits element and then render that panel into a bmap. Finally set the skin of the model to that bitmap.

Have a look at 'target_map','ent_setskin'.

Re: Text above head of entity [Re: DJBMASTER] #320688
04/23/10 19:06
04/23/10 19:06
Joined: Jun 2008
Posts: 428
Rasch Offline OP
Senior Member
Rasch  Offline OP
Senior Member

Joined: Jun 2008
Posts: 428
Ok thanks i tried it but do´n´t get it. Could you give me code sample?

This is what i got so far.

Code:
PANEL* player_render_name =
{
	digits(0,0,"%s",*,1,charname);
	flags = SHOW | OVERLAY;
}



Code:
ENTITY* rendername;
BMAP* rendermap = "#100x75x32";
		
rendername = ent_create("name_render.mdl", my.x, 0);
		
player_render_name.target_map = rendermap;
ent_setskin(rendername,rendermap,1);




Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1