Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Text location on object position.

Author
Message
SkyBox
14
Years of Service
User Offline
Joined: 23rd Apr 2012
Location:
Posted: 23rd Apr 2012 22:25
My problem here is on how to declare the location of the text reletive to the object (like a health bar hovering over an npc).

I am a very novice programmer but I know the code would go somewhere along the line as follows:

text x,y,z, 10 (to say the text is located where the object is)
text "snapdragon" (text that will hover over the object)
load object "objects/asteroid1",10 (the object number is 10)

Apologies in advance if I am not giving all the information needed. Anyway, does anyone here have experience with text locations?
Andrew_Neale
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 24th Apr 2012 00:44
Looks like you've got duplicate threads on this topic but I'll answer again here in case the other gets deleted.




Previously TEH_CODERER.
SkyBox
14
Years of Service
User Offline
Joined: 23rd Apr 2012
Location:
Posted: 27th Apr 2012 21:03
Thank you very much for the code. I'm seeing how this works now. The only issue I have now is on how to use that on a model (I may be making a mistake elsewhere in my program).



So I switched the number to 10, but I still seem to have a conflict. Usually says [ERROR, could not identify object 10] which then relates to the text code lines.
SkyBox
14
Years of Service
User Offline
Joined: 23rd Apr 2012
Location:
Posted: 27th Apr 2012 21:31
Scrap that last answer; I believe it is working, but I think the text is not visible because something else is rendered on top of it. (The objects are textured, theres a backdrop, background picture).

So now I just need the text to appear on the top layer.

Login to post a reply

Server time is: 2026-07-08 01:57:01
Your offset time is: 2026-07-08 01:57:01