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 / Nameplate above player turns out black.

Author
Message
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 12th Feb 2011 00:13 Edited at: 12th Feb 2011 00:17
I have taken the code snippet for adding 3d nameplates above a player's head and modified it for my program. Here is the source/modified code: (This compilable; test it out)


I took that code and made it into a function for my real program:


When that runs in my program everything works except for that the image that is taken from the "create bitmap" is completely black.
That code it just about copy paste from the code I have posted at the top. Why isn't this working?

Heres the outcome of the program:


Ventures of the worlds around us are only limited by imagination.
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 12th Feb 2011 00:29
Not 100% sure, but you could try and set the INK color and maybe the background color (cls) before printing the name, if the ink was set to black somewhere before this function is called it wouldn't be visible against the black background... Also possibly try using Text instead of print...

Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 12th Feb 2011 00:51
I tried the INK idea and that didn't do anything.
BUT I changed it to "Text 0, 0, Name$" and it worked!

Thanks Enderleit!

Heres the final code if anyone else wants to use it:
outside function should be: NameplateObjectNumber = makenameplate(PlayerName$)


Ventures of the worlds around us are only limited by imagination.
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 12th Feb 2011 00:57
NP... I had similar problems with Print before, although you might still wanna use CLS and INK to make sure you get the right colors in there...

Login to post a reply

Server time is: 2026-07-16 01:44:36
Your offset time is: 2026-07-16 01:44:36