When i use a wait block the COMPLETE GAME PAUSES FOR THAT TIME AND NOT THE SCRIPT i want it to only pause the script
Please reply
When i use a wait block the COMPLETE GAME PAUSES FOR THAT TIME AND NOT THE SCRIPT i want it to only pause the script
hello! it is indeed not safe to pause within a tile overlaps event like this; unlike the sprite overlaps event it does not spawn its own thread when triggered. luckily, it’s pretty easy to spawn your own thread if that’s what you want to do.
for the purposes of this example, i’m going to assume that the behavior you want is for this code to not be retriggered when the player overlaps a second tile while this event is still paused. if that’s the case, then you can use a variable and the “after _____ do” block from the timers extension to do what you want:
p.s. if you’re interested, i wrote a post a while ago about how threads work in arcade (warning: it’s pretty long)
You know, you can use the “and” boolean.
Thank you so much now my game works!
You can use the timer extension.
“and” blocks are annoying and finicky; i hate how quickly they grow horizontally when you add more clauses! nesting if statements for simple cases is easier to read/maintain imo
they grow longer and faster than pinnochios nose