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

#1 2008-12-18 11:27:12

tharvoil
Scratcher
Registered: 2008-10-24
Posts: 24

Stop Sprite's Scripts

I know you can get around this by adding in a variable but that just means more blocks. What I'd like is a block under control that says "Stop *sprite's name* Scripts" - Something that would only stop the scripts of the sprite instead of either stopping just 1 script or all. I have a bunch of ideas for use with it but it gets to laggy adding in a if/else block just for that.

Offline

 

#2 2008-12-19 09:57:28

jamie
Scratcher
Registered: 2007-03-28
Posts: 100+

Re: Stop Sprite's Scripts

<broadcast[ StopCatsScript ]
<when I receive[ StopCatsScript ]
<stop script> ?

Last edited by jamie (2008-12-19 09:57:50)


Check out my flash game site at http://subgaming.net/

Offline

 

#3 2008-12-19 12:05:45

mrweston
Scratcher
Registered: 2007-12-13
Posts: 100+

Re: Stop Sprite's Scripts

I've wanted to do that sort of thing in the past, too... it's not quite as simple as Jamie's solution, as that will only stop that one script -- not all of the scripts running in that sprite. And you can't add that Receive block to any of the others, because it can't be attached mid-script.

I think the only way to do it is by setting a variable, and having each script constantly checking its status, stopping when appropriate.

Offline

 

#4 2008-12-19 14:29:32

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: Stop Sprite's Scripts

That would be cool but wouldn't that make the games a wee bit larger? I want the script but I also want to post the games too!


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#5 2008-12-19 14:37:57

jamie
Scratcher
Registered: 2007-03-28
Posts: 100+

Re: Stop Sprite's Scripts

Buddy_ca111 wrote:

I want the script but I also want to post the games too!

Ummm.... You do post the games.

Buddy_ca111 wrote:

wouldn't that make the games a wee bit larger?

No......


Check out my flash game site at http://subgaming.net/

Offline

 

#6 2008-12-19 15:05:59

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: Stop Sprite's Scripts

Buddy_ca111 wrote:

That would be cool but wouldn't that make the games a wee bit larger? I want the script but I also want to post the games too!

If you are so wary of size, a good project will never be made. 3 blocks will make a project change so little the size change will not be noticable by the end.

Offline

 

#7 2008-12-22 11:45:59

ferret10
Scratcher
Registered: 2008-04-21
Posts: 58

Re: Stop Sprite's Scripts

When I want a script stopped I have a variable block that says "set ____ to 1" and in the script I want stopped there's "If ____ = 1 stop script"


A must-see animation about the Scratch cat! http://scratch.mit.edu/projects/ferret10/364723 ¡uʍopǝpısdn ǝdʎʇ uɐɔ ı

Offline

 

#8 2008-12-23 01:14:30

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: Stop Sprite's Scripts

Ferret10's Idea should work. (I say should cuz I havn't tried it  smile  ) But here is what I think it would look like:
Link
Img didn't work here. Wonder why?
(The Kat moves around randomly[ish] until klicked)
smile  Works!

Last edited by Buddy_ca111 (2008-12-23 01:15:39)


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

Board footer