Computer Science Canada This is driving me crazy!!! |
Author: | Fashoomp [ Wed Mar 07, 2007 4:07 pm ] | ||
Post subject: | This is driving me crazy!!! | ||
OMG this is driving me crazy. Its arrow key movement, and enter key to change the colours. I got that working, but i cant get the diagnols to work. It will go left-up, and left-down, but it will not go right up/down. I have looked over the code, and can not find ANY difference in the direction if statements (other than +/-). Please, can someone look over it and tell me why it wont work?
|
Author: | BenLi [ Wed Mar 07, 2007 5:32 pm ] | ||
Post subject: | Re: This is driving me crazy!!! | ||
that'll work deal is, you don't have to check it manually, if you just put everything in its own if statement, then it'll work perfectly And also instead of the number values you could've used KEY_UP_ARROW, KEY_DOWN_ARROW, etc. So the problem was solved by getting rid of lines, but if you wanted to solve the problem that other way then the problem was in your if statements |
Author: | Fashoomp [ Wed Mar 07, 2007 5:55 pm ] |
Post subject: | Re: This is driving me crazy!!! |
One more thing, whenever i press enter, it cycles through the colours very quickly. Is there something i can put in there so it does not think i am holding enter? |
Author: | Clayton [ Wed Mar 07, 2007 6:04 pm ] |
Post subject: | Re: This is driving me crazy!!! |
First thing, your avatar is about two times too big, just resize and re-upload it and it'll all be good Second, you need to either have some sort of variable to see if the key is actually being pressed for the first time (preferred), or have some sort of delay to prevent the colors from speeding by (not so preferred). |