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

#1 2013-01-31 01:20:34

CommanderStar
New Scratcher
Registered: 2013-01-30
Posts: 1

Why won't my script stop?

I'm just getting started with Scratch, so bear with me.

As I stated before, I'm new, so I'm not really good with writing out my script on here in scratchblocks, so I will just write it out normally.

So here is my script:

When I receive StartGame
go to x: 240 y: -145
switch to costume costume1
if > touching sprite1
forever
stop script
else
forever
{switch to costume costume1
glide 5 secs to x: -240 y: -145
wait 0.1 secs
switch to costume costume2
glide 5 secs to x: 240 y: -145}

The part I put in curly braces is the part I need to stop when my costume1 touches sprite1, but before costume1 touches sprite1, I need costume1 to glide back in forward forever until it touches sprite1, or sprite1 touches it.

It would be awesome if someone could help
Thank you

Offline

 

#2 2013-01-31 12:15:47

Mileaz
Scratcher
Registered: 2012-11-30
Posts: 31

Re: Why won't my script stop?

if > touching sprite1
forever
Needs to be swapped around  smile


http://mag.racked.eu/cimage/i9002/Achievement++get%21/Stalker%21/mca.png

Offline

 

#3 2013-01-31 16:15:51

lalala3
Scratcher
Registered: 2008-10-03
Posts: 100+

Re: Why won't my script stop?

Mileaz wrote:

if > touching sprite1
forever
Needs to be swapped around  smile

No. It needs to be changed to a repeat until.


http://img515.imageshack.us/img515/9374/signature2nt.png

Offline

 

Board footer