|
3D Text string
#213763
06/30/08 16:59
06/30/08 16:59
|
Joined: May 2007
Posts: 185 Netherlands
SurudoiRyu
OP
Member
|
OP
Member
Joined: May 2007
Posts: 185
Netherlands
|
Hello,
Does someone know how to put text above an characters head ? It is for a 1st. person RPG so you dont have to see the text if you are far away from entity, only in a certain range.
Thnx in advance,
-The Dragon's Eye is alway's watching you!-
|
|
|
Re: 3D Text string
[Re: SurudoiRyu]
#213770
06/30/08 17:57
06/30/08 17:57
|
mercuryus
Unregistered
|
mercuryus
Unregistered
|
vec_set(temp,my.x);
if(vec_dist(me.x, player.x)<1000 && vec_to_screen(temp,camera)!=NULL){
draw_text("Here I am!", temp.x, temp.y-20, vector(200,200,200));
}
where... me = the entity player = the player (you)
|
|
|
Re: 3D Text string
[Re: ]
#213779
06/30/08 20:32
06/30/08 20:32
|
Joined: May 2007
Posts: 185 Netherlands
SurudoiRyu
OP
Member
|
OP
Member
Joined: May 2007
Posts: 185
Netherlands
|
vec_set(temp,my.x);
if(vec_dist(me.x, player.x)<1000 && vec_to_screen(temp,camera)!=NULL){
draw_text("Here I am!", temp.x, temp.y-20, vector(200,200,200));
}
where... me = the entity player = the player (you) this gives multiply errors  First that temp isn't declared but i know how to fix that and after that temp.x is not a member of a function >.< And every model in the game has its own name (+ sub name like merchant etc. etc.) But is that enought with this ? i think it needs a scan aswell ? Also i want to try multiplayer with it so you can see other there names that are set with -name
Last edited by SurudoiRyu; 06/30/08 20:36.
-The Dragon's Eye is alway's watching you!-
|
|
|
Re: 3D Text string
[Re: SurudoiRyu]
#213784
06/30/08 20:47
06/30/08 20:47
|
mercuryus
Unregistered
|
mercuryus
Unregistered
|
Also i want to try multiplayer with it so you can... I know it may sound rude to you but... ...making a MP game you should at least be able to understand these three lines of code and adapt it to your needs...
|
|
|
Re: 3D Text string
[Re: ]
#213786
06/30/08 20:53
06/30/08 20:53
|
Joined: May 2007
Posts: 185 Netherlands
SurudoiRyu
OP
Member
|
OP
Member
Joined: May 2007
Posts: 185
Netherlands
|
no not rude at all  I know i can come far with it got most of the stuff allready and first try in lite-c, just trying to get know with it and multiplayer cause i like a challenge  But i can read what your doing but i don't know why the engine gives me that error never heard about it. :S
-The Dragon's Eye is alway's watching you!-
|
|
|
Re: 3D Text string
[Re: SurudoiRyu]
#213795
06/30/08 21:40
06/30/08 21:40
|
mercuryus
Unregistered
|
mercuryus
Unregistered
|
...but i don't know why the engine gives me that error never heard about it Welcome in our world 
|
|
|
Re: 3D Text string
[Re: ]
#213796
06/30/08 21:49
06/30/08 21:49
|
Joined: May 2007
Posts: 185 Netherlands
SurudoiRyu
OP
Member
|
OP
Member
Joined: May 2007
Posts: 185
Netherlands
|
Hehe Thnx :P
But can't i just place it like a bitmap ? above an entity ? Like a healthbar? The only thing is i do healthbar's as a model not a draw_square
I know that i must get the vertex of my player but aswell as all the others. convert it to screen coordinats. And then ? a panel that moves along with the characters ? doesn't that slow's the engine very much if you got like hmm 15 entity in your range and and all the panels move ?
Isn't there a way to place a text above a char and pan it with your cam and moves on the models xyz ? or must it be done with panels ?
-The Dragon's Eye is alway's watching you!-
|
|
|
Re: 3D Text string
[Re: SurudoiRyu]
#213798
06/30/08 22:07
06/30/08 22:07
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
mercuryus posted that using c-script. To change it to lite-c put...
VECTOR* temp[3]; at the beginning of the script. You might like a challenge but seriously multiplayer isn't something for beginners.
Last edited by DJBMASTER; 06/30/08 22:07.
|
|
|
|