
-----------------------------------
blaze423
Thu Jun 05, 2008 7:00 pm

Can anyone help with my game?!??
-----------------------------------
This is part of my code. There are two pictures of cars and I used the mousewhere command to make the pictures kind of like buttons. So when the user clicks on either car , it will go to display (the actual game part) . But I want the car that they pressed to appear on to display but I can't seem to do that. 
Can anyone help and give some advice to make it better????  :) 



import GUI
setscreen ("nocursor") %Hides cursor
setscreen ("noecho")

%Declaration Section
var mainButton, quitButton, playButton, rulesButton : int := 0
var font2 := Font.New ("Batang:20")
var font4 := Font.New ("Arial:16")
var mainWin := Window.Open ("position:300;300, graphics:640;400") %The main window.
var pictureID, pictureID2 : int
var item : array 1 .. 2 of int
item (1) := (pictureID)
item (2) := (pictureID2)
var picHeight, picHeight2, picWidth, picWidth2 : int





proc input
    title
    var rangeX, rangeY, button : int := 0
    Font.Draw ("Pick your car...", 100, 300, font4, 7)
    pictureID := Pic.FileNew ("car1.jpg")
    pictureID := Pic.Scale (pictureID, 250, 200)
    Pic.Draw (pictureID, 25, 100, picMerge)
    pictureID2 := Pic.FileNew ("car2.jpg")
    pictureID2 := Pic.Scale (pictureID2, 250, 200)
    Pic.Draw (pictureID2, 400, 100, picMerge)
    GUI.Hide (playButton)
    GUI.Hide (rulesButton)
    GUI.Show (mainButton)
    loop
        mousewhere (rangeX, rangeY, button)
        if button = 1 then
            if rangeX >= 25 and rangeX = 100 and rangeY = 400 and rangeX = 100 and rangeY 