For some reason when the code runs, the main sprite runs it instead of the new clone, in fact it never makes a clone at all
“Sprite” is the sprite drop-down list
“Item” is what it should report
“Stack” is the block stack below it
This is what the block looks like on the outside
What it should do is report (in this case) what direction would be after running the code in the c block and then after deleting the clone
But instead the main sprite runs the scripts inside and a clone is never created
A clone is made, it’s just deleted immediately like it should be
But I can’t see why the main sprite does the script despite it telling the clone to, the variable is set before the clone is deleted so it’s probably not that, but still that wouldn’t explain why the main sprite runs it
Since you're putting in the direction before, it will set B to the direction it was at before Stack was ran. To fix this, use a ring, or unevaluated input, then call Item after running Stack. Also, the clone is indeed running the script.
the clone does run the code, but the code does the actions to the main sprite, because the ring was created by the main sprite, and the ring keeps the variables of where it was created. things like position and direction are treated like variables.
with tell (sprite) to (ring), the ring uses the variables of that sprite, same with (ring) OF (clone). the problem here is that inside that you have RUN (Stack) and CALL (Item), and those rings are created by the main sprite. use TELL or OF on those too.
I see why the sprite is running the code. This has to do with the block context. You see, when you put a block into a ring, it remembers what sprite it was created in, then when you run it, it runs the script as if it were in the sprite. To make the clone run the script, you need to tell (my [self] to (Stack) ((my [self]) reports the sprite (or clone) that is running the script).
Works fine for me, I’m not sure why it doesn’t for you
Also, yes I did think about this myself mainly when I was creating a physics engine, I thought it would be useful for testing if a collision would happen next frame, I also plan of making an entire series of custom block