
-----------------------------------
NightStrike64
Fri Dec 06, 2013 6:01 pm

Mouse Commands in turing
-----------------------------------
What is it you are trying to achieve?
I'm trying to make a basic  intro to my game, so when you click start or exit it will do something. 


What is the problem you are having?
I cant get it to work.


Describe what you have tried to solve this problem
I've gone through a lot of forums and asked some help from friends they didn't know what to do either.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)




%Declarations,Music,Background color
process playstuff
    loop
        %Music.PlayFile ("pushthetempo.MP3")
    end loop
end playstuff

fork playstuff
View.Set ("graphics:max;max")
var x2, y2, b : int
var font := Font.New ("Impact:125")
var font2 := Font.New ("Impact:75")
var x, y, c : int
var f : int := 32
colorback (7)
cls



loop

    %Title
    Font.Draw ("Asteroix", maxx div 4 + 50, 500, font, f)
    Draw.Box (553, 320, 726, 230, red)
    Font.Draw ("Play", 550, 240, font2, f)
    Draw.Box (554, 179, 691, 100, red)
    Font.Draw ("Exit", 550, 100, font2, f)

    %Mouse Commands
    mousewhere (x, y, b)
    locate (10, 10)
    color (0)
    put "X:", x
    color (0)
    put "Y", y
    if b = 1 then
        color (0)
        put "mouse clicked"
    else
        color (0)
        put "mouse not clicked"
    end if
    
    %Need Help Here
    mousewhere (x2, y2, b)
    if b = 1 then
        if x2 >= 551 and x2 = 320 and y2  104 then
        f := 32
    end if

end loop




Please specify what version of Turing you are using


-----------------------------------
Insectoid
Fri Dec 06, 2013 6:23 pm

RE:Mouse Commands in turing
-----------------------------------
[code] if x2 >= 551 and x2 = 320 and y2 