Multi Keys for games (New Features)

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

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

while true
if apressed() then
print "a";
print ".";
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.


Complete thread:

 RSS Feed of thread

powered by my little forum