In order to customize the effect of more then one button being held down at the same time, I have written a function called CheckButtons() that checks each frame to see which buttons are being held down, and then alters a variable named buttonsDown (string) which then can be accessed by other aspects of the script instead of the traditional
It is then accessed by the movement part of the script:
(Just one of many reactions to buttonsDown's current value.)
However, the pesky debugging console tells me that there is an unexpected character ''' in this line:
asked Dec 20 '10 at 05:21 PM
Not sure if its causing your error, but "buttonsDown = 'w'" (note the single equals sign) is an assignment operation and not equivalency. For equivalency you want to have "if(buttonsDowns == 'w')" using the double equals sign.
answered Dec 20 '10 at 06:19 PM