THINg
Blitz3D Forums/Blitz3D Programming/THINg OK I take it back it does work
IS htere any way I can see if ctrl and s are hit in the space of 1 second
uh... why don't you just do,
If Keyhit(*ctrl's scancode*) and Keyhit(*S's scancode*)
SaveScreenShot()
endif
?
If Keyhit(*ctrl's scancode*) and Keyhit(*S's scancode*)
SaveScreenShot()
endif
?
thats what the code above is but you have to hit them at the exactly same time
try using keydown instead, see if that makes a difference.
something like this?
global CtrlTimer#
global SkeyTimer#
if keyhit(ctrl) CtrlTimer = 1
if CtrlTimer>0.01 CtrlTimer = CtrlTimer - .01; or a variable to simulate 1sec
if keyhit(key_s) SkeyTimer = 1
if CtrlTimer>0.01 SkeyTimer = SkeyTimer - .01
if CtrlTimer>0 and SkeyTimer>0
SaveScreenshot()
endif
global CtrlTimer#
global SkeyTimer#
if keyhit(ctrl) CtrlTimer = 1
if CtrlTimer>0.01 CtrlTimer = CtrlTimer - .01; or a variable to simulate 1sec
if keyhit(key_s) SkeyTimer = 1
if CtrlTimer>0.01 SkeyTimer = SkeyTimer - .01
if CtrlTimer>0 and SkeyTimer>0
SaveScreenshot()
endif
As you have to hit them at the exactly same time
no, not really. Keydown will report the key being pressed as long as it is pressed.