Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » double click glitch (FIXED)
- CRAZO
-
18 posts
double click glitch (FIXED)
(FIXED) in my minecraft game the blocks are MEANT to disapear after the crack have fully formed while you are mining it, HOWEVER, the block disapears after the cracks have fully formed twice. i have spent a whole hour trying to fix this glitch. so now i request that somebody could help me fix it.
here is the link to the project: http://scratch.mit.edu/projects/23240611/
i really need help.
here is the link to the project: http://scratch.mit.edu/projects/23240611/
i really need help.
Last edited by CRAZO (June 10, 2014 09:21:44)
- Bioruffo
-
37 posts
double click glitch (FIXED)
Hmm I don't have a definite answer, but I see something there - I think you can spot what it is if you show on screen the variables “break”, “can place?”, “place” and “crack progress”.
Apparently very often, if you click on a block to be broken, “place” becomes 1. So as soon as the block under the cursor is broken, another block clone immediately appears in its place, and that needs to be broken too to clear the spot. So you should check why “place” becomes 1 then.
Also, instinctively I'd say that it's safer to rely on a broadcast to kill a clone, rather than on a forever block where the clone checks for the state of a variable… There can always be the split-second case when the variable is changed before the clone deletes itself.
Apparently very often, if you click on a block to be broken, “place” becomes 1. So as soon as the block under the cursor is broken, another block clone immediately appears in its place, and that needs to be broken too to clear the spot. So you should check why “place” becomes 1 then.
Also, instinctively I'd say that it's safer to rely on a broadcast to kill a clone, rather than on a forever block where the clone checks for the state of a variable… There can always be the split-second case when the variable is changed before the clone deletes itself.
- Discussion Forums
- » Help with Scripts
-
» double click glitch (FIXED)