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 Professional Discussion / On Displaying a picture when a question is answered correcty

Author
Message
Allcreator007
12
Years of Service
User Offline
Joined: 28th Oct 2013
Location:
Posted: 14th Jan 2014 19:30
Hello, I am building a quiz game for fourth graders. When they answer the question I was able to make a green text to appear, but I would also like for a picture to pop up when they answer the question correctly and a different picture when they answer it wrong. below I will post my code so you can see and hopefully aid me in any way you can.




level2:
cls
ink rgb (255,255,255),0 : set text font "arial" : set text size 30 : set text to normal
center text 320,200, "0.3 - 0.12?"
set text size 15

If ProblemCorrect = 1 then ink rgb (0,255,0),0 : center text 320,150, "CORRECT! +5 SECONDS"

If ProblemCorrect = 2 then ink rgb (255,0,0),0 : center text 320,150, "INCORRECT! -5 SECONDS"

text 240,280,"A.) 0.18"
text 240,300,"B.) NO SOLUTION"
text 240,320,"C.) 0.81"
text 240,340,"D.) -0.18"

sorry the form message doesn't allow the lines to be fully displayed so they are put into two lines

richard G
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 15th Jan 2014 15:04
You have to load image first, or create an image. Then you have to input for user answer with the keyboard. Finally you put on screen the mesage or the image you want. To determine where to put image or text, you have to SET CURSOR x,y

Example.


I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-07 01:54:18
Your offset time is: 2026-07-07 01:54:18