#include "winmm.as"
randomize
screen 1, ginfo_dispx, ginfo_dispy, 4, 0, 0
onclick gosub *clickeda
timeGetTime
a = stat
b = 2 * 1000
z = 100
x0 = rnd(ginfo_dispx - z)
y0 = rnd(ginfo_dispy - z)
x1 = x0 + z
y1 = y0 + z
color rnd(256), rnd(256), rnd(256)
boxf x0, y0, x1, y1
mouse ginfo_dispx/2, ginfo_dispy/2
repeat
await
loop
*clickeda
onclick 0
if (x0<mousex) and (mousex<x1) and (y0<mousey) and (mousey<y1) {
cls
mouse ginfo_dispx/2, ginfo_dispy/2
timeGetTime
c = stat - a
pos 0, 0
mes c
await b
x0 = rnd(ginfo_dispx - z)
y0 = rnd(ginfo_dispy - z)
x1 = x0 + z
y1 = y0 + z
color rnd(256), rnd(256), rnd(256)
boxf x0, y0, x1, y1
timeGetTime
a = stat
}
onclick 1
return
このクリックしたら箱が消えて時間が表示されるのを3回繰り返したらやめるにはどこに repeat loop end をいれたらいいでしょうか。
お願いします。