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 Discussion / deleting text

Author
Message
Bio Fox
21
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 20th Jun 2005 06:58
I'm making a pet simulator and want to print numbers for things like health and such. Is there some way to print new numbers when they change over the old one without having to clear the whole screen and replace all of the sprites? In other words, deleting specifyed text.

Rook Takes Pawn Productions... "Now if only we could get that accursed bishop!"
miki
21
Years of Service
User Offline
Joined: 7th Jan 2005
Location:
Posted: 21st Jun 2005 02:43 Edited at: 21st Jun 2005 02:46
check the source code...


regards,
miki.

in the end
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 21st Jun 2005 02:57
But that only works when you make a 3D-object.
I would just create a box over the text you want to delete.

Also, sprites don't "vanish" when you use cls.

Immunity and Annihalation makes Immunihalation...
Xenocythe
21
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 21st Jun 2005 04:13 Edited at: 21st Jun 2005 04:14
1.Store the full health into a variable- health$="(the full health)"

2.Set the cursor to where it should print the full health- Set cursor 10,20

3.Show the full health- Print "Health = ",health$,"."

4.Wait for any key to be pressed- suspend for key

5.You encounter an enemy! Round 1 of the text based battle sequence- Print "~Round 1~"

6.Your animal gets attacked- Print "Your animal got attacked!"

7.Wait for any key to be pressed- suspend for key

8.Clear the screen- CLS

9.Set the cursor to where it should print the new decreased health- Set cursor 10,20

10.Set the new decreased health- health$="(what ever number the new health is)"

11.Then show the new decreased health- Print "Health = ",health$,"."

12.Wait for any key to be pressed- suspend for key


Here is an example:



If this is an idea of what you are looking for, I hope it helps.

~GreenFox

Enjoy Life while your still alive.
Enjoy a recees anytime!
Robot
22
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 21st Jun 2005 15:54
Use the set text opaque command and then instead of using print use text x,y,"text for screen"

The happenings of tommorow are behind us now
Bio Fox
21
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 5th Jul 2005 10:01
Thanks everyone, I've got it figured out.

Rook Takes Pawn Productions... "Now if only we could get that accursed bishop!"

Login to post a reply

Server time is: 2026-07-10 02:47:17
Your offset time is: 2026-07-10 02:47:17