Multi Keys for games (New Features)

by Jim ⌂ @, Russell, KY, Friday, January 10, 2014, 14:17 (1379 days ago) @ M Santos

function apressed()
return key = asc("A")
end function


while true
if apressed() then
print "a";
else
print ".";
endif
end while

The problem with the code is the a will only be true once for each key press or key repeat on your keyboard. The key statement pulls the current key code and then resets until the next key is pressed.

Jim.


Complete thread:

 RSS Feed of thread

powered by my little forum