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.

Newcomers DBPro Corner / How do I erase text I printed to the screen?

Author
Message
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 11th Sep 2004 08:48
Ill show you my program so far. What i want it to do now is when you press one then enter i want it to erase everything on the screen and then ill add more story and stuff. So how do i erase everything from the screen?

Weird = Unique. Unique = Human.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 11th Sep 2004 09:07 Edited at: 11th Sep 2004 09:09
CLS

I think that will do what you want. I can't see your source code.


it's cool to hate
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 11th Sep 2004 09:18
ok thanks what does cls do exactly?
heres my code

set cursor 100,100
print "It was a hot morning and you had your covers at your feet. Your alarm"
set cursor 100,120
print "goes off and you somehow muster eneough strength to sit up. Memeries"
set cursor 100,140
PRINT "fly back to your brain as you remember where you are. You sit in"
set cursor 100,160
print "your room. You remember your school which sets off a chain-reaction"
set cursor 100,180
print "in your mind to remember The Hoogawagi Tribe. You are a member of"
set cursor 100,200
print " the Hoogawagi Tribe and are currantly Admiral. You remember"
set cursor 100,220
print "your currant mission. To launch a secret attack on school and on"
set cursor 100,240
print "Wall-Mart. Your mission begins now..."
set cursor 100,280
Input "Please whack the "one" button and then "enter">>>>",one
if one=1 then print "this is where i want the program to erase everything"

Weird = Unique. Unique = Human.
Dot Merix
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 11th Sep 2004 10:12
CLS stands for clearscreen.

- Merix

Athlon xp 2400+, 1.0GB Ram, Radeon 9800PRO 128mb
Dot Merix
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 11th Sep 2004 10:13 Edited at: 11th Sep 2004 10:15
Just updating your code a bit to do what you want..



As a side note, a tip i have to give. It took me awhile to get the hang of implementing the fact that in darkbasicpro for if statements you do not put a then, after opening up the branch..

so instead of having;



You need to do it this way



- Merix

Athlon xp 2400+, 1.0GB Ram, Radeon 9800PRO 128mb
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 12th Sep 2004 01:54
ok thanks. I have dbc by the way... (i think) how do you tell?
Jsut cls worked fine for me but now i have another question. Your supposed to press enter after 1 but once you dont even have to do that! Um ig2g ill explain it more later. sry

Weird = Unique. Unique = Human.
Xander
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 14th Sep 2004 03:26
Wal-Mart only has one "l". And if you spell current with an "a" you are talking about a sour wild berry.

Here is some updated code. You have to hit enter after every print command. Is that what you mean?



That should work...

Xander Moser - Bolt Software - Firewall
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 16th Sep 2004 13:54
I don't think you need to reset the cursor position for a print. Doesn't print automatically perform a carriage return? If not, t'would be much easier to write a function.


Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 6th Oct 2004 10:33
Yes i know that wal-mart has one "L"!!! But in the game its not Wal-mart its wall-mart! They sell walls there. (its a joke if you didnt get it)

Weird = Unique. Unique = Human.
Newbie5UK
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 1st Dec 2004 18:05
Hi saw this an I have similar requirementm, but CLS clears all screen and my graphics. I have a score table in a loop for player lap times, and don't want to use cls... any way i can refresh text and variables (i.e lap time) without using cls ?

Thanks
computer
20
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 2nd Dec 2004 05:01
use text and sync?

Yes there will be coding problems.
Swhale aka The FPS Creator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: My computer chair, no zip code sorry
Posted: 2nd Dec 2004 07:16
dark basic uses that kind of code? maybe ill get this program....i know blitz basic, and i doubt dark basic is much different, what do u guys think?

Visit my computer tips and tricks web site here, www.angelfire.com/falcon/miles_web
Current Projects There: Nintendo DS
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 3rd Dec 2004 12:20
Just to clear things up, you only need to use cls if you have not rendered a 3D scene. Once you render a 3D scene, text is automatically cleared with every sync.


Login to post a reply

Server time is: 2024-11-13 18:34:19
Your offset time is: 2024-11-13 18:34:19