Jens wrote:
Heybrian, I don't understand your post. Could you please explain what you mean.
Paddle2see wrote:
I already encountered something strange trying to import a sprite that used global variables. It came in okay, and it created the globals to go along with it. But none of them worked right; they acted like two sets of local variables with the same names.
Yeah, I noticed this, too. I found out, that saving the project to disk resolved this issue and made the globals work alright.
Kevin, you're absolutely right about my suggestion basically being a call for a simple function feature (without parameters) in Scratch. Allowing sprites to 'respond' / 'answer' to requests by other sprites could not be restricted to answering its local variables, but also let them answer derived computational results, i.e. one sprite could have the script for a certain algorithm and provide this knowledge to other sprites.
i posted again. i used blocks this time.
Offline
I'm sorry, Heybrian, but I still don't get it. In your example script there's a conditional statement which is evaluated if a variable equals a certain value. It doesn't use the light blue <"variable" of "sprite"> sensing block I'm referring to (and which lamentably hasn't been added to the forum blocks yet).
Offline