3D Text string

Posted By: SurudoiRyu

3D Text string - 06/30/08 16:59

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,
Posted By: Shadow969

Re: 3D Text string - 06/30/08 17:17

there was a snippet for that in aum, around 30 - 50 issue i suppose
Posted By: Anonymous

Re: 3D Text string - 06/30/08 17:57

Code:
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)
Posted By: SurudoiRyu

Re: 3D Text string - 06/30/08 20:32

Originally Posted By: mercuryus
Code:
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 frown

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

Posted By: Anonymous

Re: 3D Text string - 06/30/08 20:47

Quote:
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...
Posted By: SurudoiRyu

Re: 3D Text string - 06/30/08 20:53

no not rude at all smile
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 smile

But i can read what your doing but i don't know why the engine gives me that error never heard about it. :S
Posted By: Anonymous

Re: 3D Text string - 06/30/08 21:40

Quote:
...but i don't know why the engine gives me that error never heard about it


Welcome in our world wink
Posted By: SurudoiRyu

Re: 3D Text string - 06/30/08 21:49

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 ?
Posted By: DJBMASTER

Re: 3D Text string - 06/30/08 22:07

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.
Posted By: SurudoiRyu

Re: 3D Text string - 06/30/08 22:16

we will see how far i come smile
© 2024 lite-C Forums