This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2008-01-21 12:44:25

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: sensing a sprite's variable

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.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#27 2008-01-23 09:30:21

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: sensing a sprite's variable

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).


Jens Mönig

Offline

 

Board footer