Discuss Scratch

gopalans
New Scratcher
1 post

Delete sprite2 using script from sprite1

I would like to know if i can delete sprite2 using “clear” or “Hide” or any other block from sprite1.
I am looking to dynamically delete or set some propoerties of 1 sprite from another sprite.
Any suggestions?
drmcw
Scratcher
1000+ posts

Delete sprite2 using script from sprite1

Use a broadcast then when the other sprite receives the broadcast event then it can do whatever you want like show or hide. What you cannot do is delete a sprite via a script.

Last edited by drmcw (June 21, 2013 19:47:39)

theoriginalone
New Scratcher
2 posts

Delete sprite2 using script from sprite1

You can set ghost effect to 100 then stop all the sprite's scripts. That essentially deletes it. But yeah, like drmcw said, use a broadcast from sprite 1 to do it.
leog20162
Scratcher
82 posts

Delete sprite2 using script from sprite1

try this code:
//this is for sprite 1:
broadcast[delete sprite 2 v]

// this is for sprite 2:
when i receive[delete sprite 2 v]
hide

Last edited by leog20162 (July 29, 2024 09:49:06)

Powered by DjangoBB