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 / making a save prompt

Author
Message
MEE
17
Years of Service
User Offline
Joined: 3rd Mar 2008
Location: salem OR
Posted: 15th Mar 2008 23:34 Edited at: 16th Mar 2008 02:40
Hi i'm a beginner in dark basic and i'm trying to make a simple level editor.

I can save stuff in my program but i can't seem to
make a save prompt ask the user "are you sure you want to save".
It just flashes the meseage for a split second with out waiting for
input from the user.


Here's the code im trying to make work



Why do we BAKE cookies and COOK bacon?
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 16th Mar 2008 00:14 Edited at: 16th Mar 2008 00:18
Quote: "beginner in dark basic"

Quote: "simple level editor"

Sorry to burst your bubble, but a level editor isn't "simple," and it's definitely not a good way to start.
Also put your code in a code snippet.
But on to your question, TDK made dialog boxes for the kind of situation you're in.

Seriously, how do you make the little blue text come up below your message?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 16th Mar 2008 00:44
@MEE
Your approach is a little off. Avoid using suspend for key and inkey$() as your inpout detection method. An alternative is to use a repeat loop until your input choices are met:


Also avoid using print if you can. TEXT is much better and it allows the use of different fonts. Here's a version of the code you posted using the repeat loop



Enjoy your day.
MEE
17
Years of Service
User Offline
Joined: 3rd Mar 2008
Location: salem OR
Posted: 16th Mar 2008 00:46
Sorry this is my first post
how do I put my code in a snippet?

oh and thank you that looks like it just might work

Why do we BAKE cookies and COOK bacon?
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 16th Mar 2008 00:47 Edited at: 16th Mar 2008 00:53
this code might work I don't really know but here it is



and are you using these in a loop? because if not it'll be really hard to use. And yes theres a go to in there.

[edit]

Latch posted before me so pay no attention to this post this.

Tip Of The Day!: a new rouge anti-virus has risen in 2008 called xpantivirus 2008 don't download this. Please help spread the word.
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 16th Mar 2008 08:20
re. your problem of the flashing method:

The print command doesn't stay on the screen for longer than 1 frame when using 3d objects (i don't think text does either, but not sure)

a good idea is to put these into a repeat-until loop.

essentially:
MEE
17
Years of Service
User Offline
Joined: 3rd Mar 2008
Location: salem OR
Posted: 20th Mar 2008 04:30
Actualy I found out that if you say

Set Camera View 0,0,1,1

then it keeps the text on the screen untill I
set the camera back using

Set Camera View 0,0,800,600

so that in combination with Latch's code solved my problem compleatly

Thanks BN2 for your info anyway.
And thanks again for your code Latch.

Why do we BAKE cookies and COOK bacon?

Login to post a reply

Server time is: 2025-06-04 03:32:06
Your offset time is: 2025-06-04 03:32:06