why does my 14M dice roll always stop at 6
press:
if pin0=1 then faster
faster:
pause 50
let b6=30
goto chase
chase:
for b5=1 to 30
dec b6
pause b6
pins=%00000001
pause b6
pins=%00000010
pause b6
pins=%00000100
pause b6
pins=%00001000
pause b6
pins=%00010000
pause b6
pins=%00100000
pause b6
pins=%00000000
if b6=1 then dice
next b5
goto chase
dice:
pause 10
for b4=0 to 3
random w0
b2 = w0// 6 + 1
next b4
pause 10
let b3=b2
pause 10
if b3=1 then high 0
endif
if b3=2 then high 1
endif
if b3=3 then high 2
endif
if b3=4 then high 3
endif
if b3=5 then high 4
endif
if b3=6 then high 5
endif
wait 4
let pins=%00000000
end
I have looked at random in manual and hippys posts on random. glitch in my code I guess.
appreciate any suggestions.
press:
if pin0=1 then faster
faster:
pause 50
let b6=30
goto chase
chase:
for b5=1 to 30
dec b6
pause b6
pins=%00000001
pause b6
pins=%00000010
pause b6
pins=%00000100
pause b6
pins=%00001000
pause b6
pins=%00010000
pause b6
pins=%00100000
pause b6
pins=%00000000
if b6=1 then dice
next b5
goto chase
dice:
pause 10
for b4=0 to 3
random w0
b2 = w0// 6 + 1
next b4
pause 10
let b3=b2
pause 10
if b3=1 then high 0
endif
if b3=2 then high 1
endif
if b3=3 then high 2
endif
if b3=4 then high 3
endif
if b3=5 then high 4
endif
if b3=6 then high 5
endif
wait 4
let pins=%00000000
end
I have looked at random in manual and hippys posts on random. glitch in my code I guess.
appreciate any suggestions.