How can I make a sort of "wait until" without using the wait until block? I'm not going to use the wait until block because I don't want the entire script to stop while one section is waiting.
Offline
It depends on what you're trying to do... could you maybe upload it so I could see?
Offline
One script in Scratch is equivalent to one thread. Only one block from that script can be executing at a time, so it is therefore impossible to have part of a script wait while other parts execute!
Offline
Use timer, reset it and check if it's more than something.
Offline
fullmoon wrote:
One script in Scratch is equivalent to one thread. Only one block from that script can be executing at a time, so it is therefore impossible to have part of a script wait while other parts execute!
I mean more of an "if inside an if". Unfortunately, the "if's" I need are opposites- if mouse clicked, and then if mouse not clicked inside that. Tried it, and it didn't work.
Offline
Sunrise-Moon wrote:
^
So you're waiting for a condition to happen but you want it to continue executing something until it does happen:
... loop_check = 0 repeat until <loop_check = 1>: //Do some other stuff here if <condition to check>: loop_check = 1 loop_check = 0 //Continue doing some other stuff...
This would work well if you replaced <condition to check> with <mouse down?> or something.
Offline
fullmoon wrote:
Sunrise-Moon wrote:
^
So you're waiting for a condition to happen but you want it to continue executing something until it does happen:
Code:
... loop_check = 0 repeat until <loop_check = 1>: //Do some other stuff here if <condition to check>: loop_check = 1 loop_check = 0 //Continue doing some other stuff...This would work well if you replaced <condition to check> with <mouse down?> or something.
That could possibly work, though I may have tried it already. I'll test it, thanks .
@12three: I'll probably end up posting it if the above does not work.
Offline