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

Username:   Password: 
 RegisterRegister   
 Beat Creator New Problem (Automating with Arrays)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mitheralice




PostPosted: Thu Jun 05, 2014 9:36 am   Post subject: Beat Creator New Problem (Automating with Arrays)

What is it you are trying to achieve?
I am trying to automate my program with arrays. Right now, I can't tell what the issue is with my code.


What is the problem you are having?
I am trying to automate, when I click on a box I want to be able to un-click it with the right button. This is achievable, but now that I have condensed it into an array the buttons are unclickable.


Describe what you have tried to solve this problem
My Comp Sci teacher said something about my array being disconnected from the boxes, I don't really understand.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)


Turing:


loop
    count := count + 1
    if count > 7
            then
        count := 1
    end if
    holdy := holdy + 50

    if holdy > 600
            then
        hold := 0
    end if

    Mouse.ButtonChoose ("multibutton")
    Mouse.Where (x, y, b)
    left := b mod 10               % left = 0 or 1
    middle := (b - left) mod 100       % middle = 0 or 10
    right := b - middle - left         % right = 0 or 100
    if left = 1 then
        if x > 100 + hold and x < 150 + hold
                and y > 125 + holdy and y < 175 + holdy
                then
            re (count) := 1
            Music.Play ("aaa")
        end if
    end if
    if right = 100 then
        if x > 100 and x < 150
                and y > 125 and y < 175
                then
            re (count) := 0
        end if
    end if

    if re (count) = 1
            then
        Draw.FillBox (100, 125 + holdy, 150, 175 + holdy, red)


    elsif re (count) = 0
            then
        Draw.FillBox (100, 125 + holdy, 150, 175 + holdy, black)
        Draw.Box (100, 125 + holdy, 150, 175 + holdy, red)
    end if

end loop



Please specify what version of Turing you are using
4.1.1



Beats Dev File.t
 Description:

Download
 Filename:  Beats Dev File.t
 Filesize:  1.75 KB
 Downloaded:  94 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Srlancelot39




PostPosted: Thu Jun 05, 2014 11:17 am   Post subject: RE:Beat Creator New Problem (Automating with Arrays)

You don't need to create a new thread for a new issue on the same project. Keep it all in one thread so that not only is all the information/help/history of the project is in one place, but also to prevent the forum from being spammed with duplicate topics. Razz
The position of a thread on the forums is not constant, they rearrange according to which one was last replied to. So, replying to your own thread with an update on the situation will bump it to the top of the list and keep it from getting buried.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: