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

Username:   Password: 
 RegisterRegister   
 Game problem help quickly please!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
surfed




PostPosted: Mon May 30, 2005 4:29 pm   Post subject: Game problem help quickly please!

code:

process gameMenu
    var butGame : int := GUI.CreateButton (250, 120, 150, "New Game", newGame)
    var butOption : int := GUI.CreateButton (250, 90, 150, "Options", options)
    var butScore : int := GUI.CreateButton (250, 60, 150, "High Scores", highScore)

    loop
        exit when GUI.ProcessEvent
    end loop
end gameMenu   

loop
        var title : int := Pic.FileNew ("title.jpg")
        var titleG : int := Pic.FileNew ("titleG.jpg")
        var titleB : int := Pic.FileNew ("titleB.jpg")

        Pic.SetTransparentColor (title, brightred)
        Pic.Draw (title, 180, maxy div 1.5, picMerge)

        delay (150)

        Pic.SetTransparentColor (titleG, brightred)
        Pic.Draw (titleG, 190, maxy div 1.5, picMerge)

        delay (150)

        Pic.SetTransparentColor (titleB, brightred)
        Pic.Draw (titleB, 190, maxy div 1.5, picMerge)

        delay (150)
    end loop

fork gameMenu


how do i make it so when i press a button, the loop stops ( the loop with the pictures and the delays). when i put cls, the intro still still executes. Should i actually use the process? when i just put it as normal code, the picture stops at the part :
code:
    loop
        exit when GUI.ProcessEvent
    end loop
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: Mon May 30, 2005 5:10 pm   Post subject: (No subject)

Thats the worst use of processes i have ever seen except there was this post but nevermind.

1) Dont use processes for this
2) Look up procedures and GUI help index
3) go here -> http://www.compsci.ca/v2/viewtopic.php?t=9012

There is a post by me, someone asking for the same problem. Look at the bottom-most post.
surfed




PostPosted: Mon May 30, 2005 9:06 pm   Post subject: (No subject)

i read that thread, but i still cant figure out how to do it.. Should i just use procedures? maybe you can give me an example?

thanks
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  [ 3 Posts ]
Jump to:   


Style:  
Search: