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

Username:   Password: 
 RegisterRegister   
 Need Help making turing game which includes mouse
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TuringHelp




PostPosted: Wed May 12, 2010 8:26 am   Post subject: 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


[<It can be a simple game as long as it requires the mouse to play. when i say simple i mean simple nothing to hard to make>
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed May 12, 2010 9:30 am   Post subject: RE:Need Help making turing game which includes mouse

Turing Walkthrough -> Mouse Tutorial
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
chrisbrown




PostPosted: Wed May 12, 2010 9:44 am   Post subject: 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.
Turing:
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
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: