I'm writing an arcade game were I need a delay for the man between steps. Also using the keyboard arrows to direct user man. Using delay at 5000 (changeable)
Dim mark(15000)
'Sub
DEALAYMAN:
TIMER ON: CONST unmark =0, narkit = NOT unmark: start!= TIMER
num = 0
For n = 3 to delay STEP 2
IF NOT mark(n) THEN
delta = 3 * n
FOR i = 3 * n to delay STEP delta
NEXT: num = num + 1
END IF
NEXT
finish! - TIMER: RETURN
I tried a simpler method
DELAYMAN: TIMER ON: delay = TIMER + .004
TM1: dy = TIMER: IF DY < delay THEN GOTO TM1
RETURN
This works although .004 is too slow and although I stop pressing the arrown keys the man keeps on running
Can someone please help?
Thanks in anticipation.
joec
Dim mark(15000)
'Sub
DEALAYMAN:
TIMER ON: CONST unmark =0, narkit = NOT unmark: start!= TIMER
num = 0
For n = 3 to delay STEP 2
IF NOT mark(n) THEN
delta = 3 * n
FOR i = 3 * n to delay STEP delta
NEXT: num = num + 1
END IF
NEXT
finish! - TIMER: RETURN
I tried a simpler method
DELAYMAN: TIMER ON: delay = TIMER + .004
TM1: dy = TIMER: IF DY < delay THEN GOTO TM1
RETURN
This works although .004 is too slow and although I stop pressing the arrown keys the man keeps on running
Can someone please help?
Thanks in anticipation.
joec
Comment