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 / Basic help

Author
Message
Lemon Phat
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Minnesota
Posted: 20th May 2011 15:42
OK!

Well, I just startes some DBP programming/coding in school... And well, our teacher didn't teach us anything.. except what a loop, if and statement.. and maybe the most basic things are...

We currently have to make a two level game, that has 20 facts incorporated into it.. My idea was to print a fact on the screen everyone time you ran into an object, in this case... a fruit...

I'll post this, if it helps..

Lemon Phat
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Minnesota
Posted: 20th May 2011 16:14
I just realized I didn't really ask what i wanted..

I needed help on what exactly to put in my code, so it would print "fact here" on the screen every time i ran into a fruit.

(you can still play the game, put its juts printed on the top of the screen or something..)
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th May 2011 18:16
One way:
"text x,y,txt$"

...where x and y are the position on screen (starting top left) to print the text at, and txt$ is given a value by you to print IE:

txt$="Apple"

or...

txt$=str$(FruitColor)

Hope that helps. I'll watch this thread for any further questions...

Lemon Phat
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Minnesota
Posted: 23rd May 2011 15:42
So...

I'm still a little bit confused.


If i wanted to have it print something like " Soda is bad for you"

How would I do that..

And is there a certain place I would need to put this into my code, I can put the whole code if need be.

I'll be online for the next hour or so.
If anyone wants to send me an email with some help, instead of posting here...

My email for online is: lemon.phat@gmail.com
Lemon Phat
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Minnesota
Posted: 23rd May 2011 15:46
AAHH!!

just left out another thing...

I need t insert 20 different questions...

Any advice on how to do that..

My goal is to put like 10-20 fruits per level, then have half of them trigger these random questions
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd May 2011 16:24
I just mailed you an example but I'm thinking it might be worth taking a little look at your code. You could email it to me or post it here, either way I'll take a look and try to give you a few pointers where I can.

Lemon Phat
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Minnesota
Posted: 24th May 2011 16:04
HEY!

thanks Steven, Help is very much appreciated, I just emailed you My code, and all the files...


Let's see how my project turns out!


baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th May 2011 15:18
It's a good idea to keep one problem to one post (for future reference). I posted an answer to this on the new thread you made but as it would be confusing it might be best if once you have a working version you could maybe post a brief description of how you resolved the issue?

Login to post a reply

Server time is: 2024-11-16 21:53:48
Your offset time is: 2024-11-16 21:53:48