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

#1 2012-06-11 13:52:40

17zhuor
New Scratcher
Registered: 2012-04-04
Posts: 5

Please please please help my script.

The situation is that I have choices on my screen. Four of them to be exact, and each choice is a sprite. In the background, there is a countdown, from 10 to 0, and a wait 1 second block between them.

I want that if a choice is clicked (and it is the wrong one), the timer restarts, so it goes back to the background that has 10 on it. How do I do that?

Currently, the problem is that once the choice is clicked, one script restarts the backgrounds but the script from before still plays. I want this one to stop when a choice is clicked.

It sounds a little bit confusing, but thank you!

Offline

 

#2 2012-06-11 15:35:03

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: Please please please help my script.

I'm not understanding what you mean but I can try to help you the best I can with what I think you meant. Okay, so try this; Make a variable, and call it "timer". when the choices are available to be clicked, set the "timer" variable to 1. Make the choices sprites have their scripts in a "repeat until "timer" = 0" block, and when a choice is clicked, set the "timer" variable to 0. When you want the process to restart, simply set the variable back to 1 and broadcast the scripts for the choices. Hope I helped! Also, I could probably help even more by looking at your project. Could you upload it so I could download and take a look?


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#3 2012-06-11 18:16:43

17zhuor
New Scratcher
Registered: 2012-04-04
Posts: 5

Re: Please please please help my script.

Sure! I uploaded it now, thanks a bunch.

Offline

 

#4 2012-06-11 19:13:19

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: Please please please help my script.

17zhuor wrote:

Sure! I uploaded it now, thanks a bunch.

I fixed it for ya (: Not sure where else you were taking it, so I stopped working on it, but I left a bunch of notes you can read so you can see why I did some of the things in it (: Hope I helped! Here's a link to the project:

http://scratch.mit.edu/projects/Zparx/2604178


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#5 2012-06-11 22:05:43

17zhuor
New Scratcher
Registered: 2012-04-04
Posts: 5

Re: Please please please help my script.

This is amazing. I would have never known how to do this. If I want to create more levels,  how do I go from there?

Offline

 

Board footer