Tony @ Mon Mar 16, 2009 11:28 pm wrote:
You have an array that represents the input state, very similar to the one you would have from Input.KeyDown. If you want a particular button, just check the corresponding index directly.
(that is, you don't normally loop over every keyboard key, looking if letter 'Q' was pressed)
So could write a program using Input.KeyDown then use something like this
Turing: |
Input.KeyDown (key )
for i : 1 .. 31
if joy (1).button (i ) then
if i = 1 then
key = ('1')
elsif i = 2 then
key = ('2')
elsif i = 3 then
key = ('3')
elsif i = 4 then
key = ('4')
elsif i = 5 then
key = ('5')
end if
end if
end for
|