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 / Print command.

Author
Message
Not_Maindric
18
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 16th Jul 2007 23:42
I know this is a very newbie question, but I have been looking for this for a few hours now. I have been trying to make a basic text game, (I got this 2 days ago.) and after a while, the text just runs off the screen, so you cannot see it anymore. What I have been looking for for a while is something that removes the text from the screen, so it can be printed to the top again, but I cannot find the command. I looked in the help files, searched forever on this board, and looked in the booklet I got, but cannot find it. Thanks for any help.
Lucifer
20
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 17th Jul 2007 00:22
try putting a set cursor 0,0 at the top of your text program, that might help so that the text wont run off.. and the CLS command will clear the screen..


oh praise the lord, praise furry jesus
Not_Maindric
18
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 17th Jul 2007 00:36
Sweet, thanks, that helped ALOT.
Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 17th Jul 2007 01:06
TEXT is a good command to use as well

Set cursor doesn't have to be 0,0 though. It can be anywhere, but 0,0 will have the text automatically go down the screen with each PRINT command.

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 17th Jul 2007 02:47 Edited at: 17th Jul 2007 02:47
And CLS includes a Set Cursor 0,0 call, so you don't need both.

TDK_Man

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 17th Jul 2007 15:00
the easiest thing to do is just separate your text into lines in the editor

I am king of the noobs!
Not_Maindric
18
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 19th Jul 2007 23:29
Ok, this is off and on topic. Does the CLS command remove everything off of the screen or just text? "I cannot test that out right now seeing as I am at my dad's, and cannot use DBC right now...

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 20th Jul 2007 01:46 Edited at: 20th Jul 2007 01:47
CLS removes all 2D from the screen. If you have a 3D viewport on the screen it will not be affected by CLS.

TDK_Man

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Jul 2007 01:47
@Maindric
The screen is just a bitmap (bitmap 0 in fact), so everything that is pasted or printed or drawn on the screen will be wiped.
However, sprites and 3D objects are constantly re-drawn so they wont disappear. If you want to remove these you will have to hide or delete them.

I am king of the noobs!

Login to post a reply

Server time is: 2026-07-06 03:58:11
Your offset time is: 2026-07-06 03:58:11