Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Quiz Game Animation Problem! Due tmrw, HELP asap !
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Sopheea08




PostPosted: Sun Jan 17, 2010 2:01 pm   Post subject: Quiz Game Animation Problem! Due tmrw, HELP asap !

What is it you are trying to achieve?
Making the stars animate and the press any key to begin start at the same time.


What is the problem you are having?
The stars animate and then the press any key to begin starts.


Describe what you have tried to solve this problem
I've tried to put separate loops but it doesnt work.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
I have not finished the program but this is what i have so far.

Turing:


%Main Menu background
setscreen ("graphics:640;480")
colorback (2)
drawfill (0,0,2,2)

%Main Menu
%Title
var font1,font2,font3,font4:int
font1 := Font.New ("serif:14")
        assert font1 > 0
        font2 := Font.New ("sans serif:14:bold")
        assert font2 > 0
        font3 := Font.New ("Palatino:12:italic")
        assert font3 > 0
        font4 := Font.New ("Palatino:18:bold,italic")
        assert font4 > 0

drawbox (10,10,630,470,7)
Font.Draw ("Can YOU calculate numbers?",180,240,font4,black)


%Start Button

loop
drawstar (50-10,400-10,50+10,400+10,14)
drawfillstar (50-10,400-10,50+10,400+10,14)
delay (100)
drawstar (50-10,400-10,50+10,400+10,2)
drawfillstar (50-10,400-10,50+10,400+10,2)
delay (100)
drawstar (590-10,400-10,590+10,400+10,14)
drawfillstar (590-10,400-10,590+10,400+10,14)
delay (100)
drawstar (590-10,400-10,590+10,400+10,2)
drawfillstar (590-10,400-10,590+10,400+10,2)
delay (100)
drawstar (50-10,40-10,50+10,40+10,14)
drawfillstar (50-10,40-10,50+10,40+10,14)
delay (100)
drawstar (50-10,40-10,50+10,40+10,2)
drawfillstar (50-10,40-10,50+10,40+10,2)
delay (100)
drawstar (590-10,40-10,590+10,40+10,14)
drawfillstar (590-10,40-10,590+10,40+10,14)
delay (100)
drawstar (590-10,40-10,590+10,40+10,2)
drawfillstar (590-10,40-10,590+10,40+10,2)
delay (100)
loop
var key:string (1)
Font.Draw ("Press any key to begin",250,15,font3,blue)
getch (key)
cls
%Instructions
Font.Draw ("Welcome to Can YOU calculate numbers!",150,440,font1,blue)
Font.Draw ("This is a Math Quiz Show to determine how smart you are in Math.",1,400,font1,black)
Font.Draw ("There are 9 questions in this quiz.",1,350,font1,black)
Font.Draw ("You must answer all the questions using your knowledge.",1,300,font1,black)
Font.Draw ("NO CHEATING ! >D",1,250,font1,black)
Font.Draw ("You will be given a choice to answer the question again, or continue on.",1,200,font1,black)
Font.Draw ("The quiz starts with 3 lives. When you lose your lives, the quiz will end and display",1,150,font1,black)
Font.Draw ("your score.",1,100,font1,black)
Font.Draw ("GOOD LUCK AND HAVE FUN! :D",150,50,font1,red)
delay (5000)
cls
%Questions before the game
var name:string
colorback (0)
drawfill (0,0,0,0)
put "Enter your name"
get name
put "Thank you ",name
Font.Draw ("This quiz will start in 3 seconds",150,380,font1,black)
Font.Draw ("Get Ready!",150,350,font1,black)
delay (2000)
cls
colorback (8)
drawfill (0,0,8,8)
var category:string
locate (18,15)
put "Choose a category"
locate (18,18)
put "Addition"
locate (19,19)
put "Subtraction"
locate (20,20)
put "Multiplication"
locate (21,21)
put "Press 1 for Addition, 2 for Subtraction, or 3 for Multiplication"
get category
cls
if category="1" then
put "What is 5+5?"
elsif category="2" then
put "What is 10-5?"
elsif category="3" then
put "What is 10*10?"
end if
end loop
end loop



Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: