key tap
Blitz3D Forums/Blitz3D Programming/key tap
| ||
i know this one has been asked 2 many times - i just missed the thread (actually i feel not need it at that time - now i need it)... how do we detect a key continously hit - lets say, i pressed UpArrow to normal run. then if i wanna straff so i have to tap the uparrow twice. how to detect the 'tap' - take teken as an eg. with this key tap orderly, it can create unique movement... |
| ||
maybe something like this, it's late, maybe wrong. if PunchKeyValue# = 0 if keydown/keyhit(punch) PunchKeyValue# = 1 endif elseif PunchKeyValue# > 0 if keydown/keyhit(punch) doubletap = true endif endif if PunchKeyValue#>0 PunchKeyValue=PunchKeyValue - .1 if PunchKeyValue#<0 PunchKeyValue=0 |