OnceKeypress
Posted: 31 Dec 2016, 20:22
I think it would be helpful if Teascript had a way of detecting when a button was pressed only once (not holding). It would be nice to create custom power-ups and gimmicks.
I did this test but it's crashing:Catskart wrote:It can help you :
If keypress(XX) then
Do something.
Press:
If keypress(XX) then
Call sleep(1)
goto Press:
End if
End if
But your suggestion is useful.
Code: Select all
If keypress(-16) then
Do
val(valtest)= val(valtest)+1
Press:
If keypress(-16) then
Call sleep(1)
goto Press
End if
loop
End ifAh... Sorry ... You used the italic for highlight... I did not realize... I'll test now. Very thanks.Catskart wrote:The do something isn't a loop, it's just nothing, remove do and loop.