
-----------------------------------
TuringHelp
Wed May 12, 2010 8:26 am

Need Help making turing game which includes mouse
-----------------------------------
What is it you are trying to achieve?
I am trying to make a game that uses the mouse to interact

What is the problem you are having?
I am confused and would appreciate if someone told me haow to do it


[

-----------------------------------
Tony
Wed May 12, 2010 9:30 am

RE:Need Help making turing game which includes mouse
-----------------------------------
Turing Walkthrough -> Mouse Tutorial

-----------------------------------
chrisbrown
Wed May 12, 2010 9:44 am

RE:Need Help making turing game which includes mouse
-----------------------------------
Mouse.Where will let you determine the location of the mouse, and whether or not a button is being pressed. Both of these things are represented by integers: the location as x/y co-ordinates, and button presses as {0 = not pressed, 1 = pressed}. You can also configure multiple-button mouses but it's a little more complicated.

The following program displays mouse information. It should give you a starting point.
var mouse_x, mouse_y, mouse_btn : int

View.Set("graphics;offscreenonly")

loop
    cls
    Mouse.Where(mouse_x, mouse_y, mouse_btn)
    put "mouse x = ", mouse_x
    put "mouse y = ", mouse_y
    put "mouse btn = ", mouse_btn
    put "mouse button is " ..
    if mouse_btn = 0 then
        put "not pressed"
    else 
        put "pressed"
    end if
    View.Update
end loop
