Dear Scratchers!
The aim would be to measure time by using a variable. What we wanted to achieve was to get the time variable change second-by-second until the space was pressed. the whole process was going to be started by clicking on the green flag. The variable does change as we wanted it to, however, hitting the space button does not achieve anything. Any suggestions why? Thanks!
when gf clicked repeat until <key [space] pressed?> wait (1) secs change [time] by (1) end stop all
Offline
OK, I think I might have identified the problem. The "key space pressed" block that you are using only works if it is pressed down when the script gets repeated using the "repeat until" block. You can hit the space bar any time in between and it will not work.
To avoid this problem do:
when gf clicked forever wait (1) secs change [time] by (1) when [space] key pressed stop all
Offline