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

#1 2008-07-06 08:54:07

beefrocks
Scratcher
Registered: 2008-06-27
Posts: 18

Sprite Properties

Imagine that you're making a very large project, and you have about 50 sprites that you need to program to react in the exact same way when one other sprite comes in contact with them. If sprite "Properties" were availible, then one cound say, "When touching 'Heat Source', broadcast 'Burn'". That way, all you would have to do is assign the property "Heat Source" to those 50 sprites. Although that, too, would take a long time, it would be a good deal quicker.

Offline

 

#2 2008-07-06 10:07:47

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: Sprite Properties

If I understood what you mean, I think you can get the same result by assigning the same color to the border of all the 50 "burners" and then do just

(forever if (touching color ___))
   (broadcast "burn")
)

Offline

 

#3 2008-07-07 11:45:39

beefrocks
Scratcher
Registered: 2008-06-27
Posts: 18

Re: Sprite Properties

s_federici wrote:

If I understood what you mean, I think you can get the same result by assigning the same color to the border of all the 50 "burners" and then do just

(forever if (touching color ___))
   (broadcast "burn")
)

True. That is what I mean. However, sometimes the picture quality of the sprite is too important for that.

Offline

 

#4 2008-07-07 15:08:22

rrcool
Scratcher
Registered: 2008-04-23
Posts: 6

Re: Sprite Properties

Thats a great idea! You don't have to worry about assining the property. you can assaign it to one and duplicate it for the other 49!

Offline

 

Board footer