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

#1 2012-08-07 19:35:10

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Screensaver? Help!

Hello, I'm making a screensaver, and how come this script doesn't work?


repeat (180)
go to x: (150) y: (0)
repeat until <<touching [green]> or <touching [edge]>)
move 1 step
stamp

Last edited by coolhogs (2012-08-07 19:35:41)


Get ready for domination of:  tongue

Offline

 

#2 2012-08-07 19:39:24

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Screensaver? Help!

Well, since you're putting the

go to x: (150) y: (0)
inside the repeat, it's going to do that, move 1 step, stamp, then go back to x: 150. I'm assuming you want this:
go to x: (150) y: (0)
repeat until <<touching [#00FF00]?> or <touching [edge v]?>>
move (1) steps
stamp
end
or
go to x: (150) y: (0)
repeat until <<touching [#00FF00]?> or <touching [edge v]?>>
move (1) steps

end
stamp

Last edited by TorbyFork234 (2012-08-07 19:39:50)

Offline

 

#3 2012-08-07 19:42:40

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

I need the repeat (180) thing...  hmm


Get ready for domination of:  tongue

Offline

 

#4 2012-08-07 19:44:10

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Screensaver? Help!

coolhogs wrote:

I need the repeat (180) thing...  hmm

What's the problem then?

Last edited by TorbyFork234 (2012-08-07 19:44:18)

Offline

 

#5 2012-08-07 19:46:50

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

Um, well try the script out...


Get ready for domination of:  tongue

Offline

 

#6 2012-08-07 19:48:31

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

There's 2 sprites with this script.

One basically goes to the other.


Get ready for domination of:  tongue

Offline

 

#7 2012-08-07 19:50:47

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Screensaver? Help!

coolhogs wrote:

There's 2 sprites with this script.

One basically goes to the other.

Can you be a little more specific? Could there be other scripts interfering?

Offline

 

#8 2012-08-07 19:54:15

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

there's none...  tongue

I'll upload the project.


Get ready for domination of:  tongue

Offline

 

#9 2012-08-07 19:55:16

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

It's up...


Get ready for domination of:  tongue

Offline

 

#10 2012-08-07 19:57:24

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Screensaver? Help!

Ok, the problem is that it's already touching green, either from the other sprite or from it's first stamp, so it's skipping the move 1 step stamp, it's just rotating. If you want it to go to each other (or to the edge), make each a slightly different color and have the touching color block specify the color of the other sprite. If you don't want it to do that please specify what you want it to do.

Last edited by TorbyFork234 (2012-08-07 19:59:58)

Offline

 

#11 2012-08-07 20:12:11

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

OK, thanks!  smile


Get ready for domination of:  tongue

Offline

 

#12 2012-08-07 20:15:02

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

I did that and it didn't work.  hmm


Get ready for domination of:  tongue

Offline

 

#13 2012-08-07 20:26:36

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Screensaver? Help!

Try this for both (keeping the color change)

when gf clicked
go to x:(-150) y:(0) //or 150
clear
point in direction (-90) //or 90 (depending on what sprite)
repeat (360)
stamp
turn ccw (1) degrees
end
go to x:(150) y:(0)
turn cw (2) degrees
clear
wait (0.1) secs //only for the one that start out at x:-150
repeat until <<touching color [#00FF00]?>or<touching [edge v]?>> //put the right color
move (1) steps
stamp
end
clear
You can then work your way of that, assuming that that's what you want because you still have not made that clear.

Last edited by TorbyFork234 (2012-08-07 20:28:05)

Offline

 

#14 2012-08-08 10:53:32

PencilFactory
Scratcher
Registered: 2011-11-11
Posts: 100+

Re: Screensaver? Help!

coolhogs wrote:

Hello, I'm making a screensaver, and how come this script doesn't work?


repeat (180)
go to x: (150) y: (0)
repeat until <<touching [green]> or <touching [edge]>)
move 1 step
stamp

when gf clicked
point in direction (90 v)
repeat (180)
go to x: (150) y: (0)
turn cw (1) degrees
repeat until <<touching color [#00ff00]?> or <touching [edge v]?>>
move (1) steps
end
stamp

Last edited by PencilFactory (2012-08-08 10:55:06)


PencilFactory is http://blocks.scratchr.org/API.php?user=PencilFactory&amp;action=onlineStatus&amp;type=text, see my computerhttp://mag.racked.eu/cimage/i9002/Achievement+get%21/Computer+crashed/mca.png

Offline

 

#15 2012-08-08 13:18:56

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Screensaver? Help!

TorbyFork234 wrote:

Try this for both (keeping the color change)

when gf clicked
go to x:(-150) y:(0) //or 150
clear
point in direction (-90) //or 90 (depending on what sprite)
repeat (360)
stamp
turn ccw (1) degrees
end
go to x:(150) y:(0)
turn cw (2) degrees
clear
wait (0.1) secs //only for the one that start out at x:-150
repeat until <<touching color [#00FF00]?>or<touching [edge v]?>> //put the right color
move (1) steps
stamp
end
clear
You can then work your way of that, assuming that that's what you want because you still have not made that clear.

Um, I accidentally deleted my copy of that project. (didn't save), so could you upload my copy to Scratch?


Get ready for domination of:  tongue

Offline

 

#16 2012-08-08 14:46:57

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Screensaver? Help!

coolhogs wrote:

TorbyFork234 wrote:

Try this for both (keeping the color change)

when gf clicked
go to x:(-150) y:(0) //or 150
clear
point in direction (-90) //or 90 (depending on what sprite)
repeat (360)
stamp
turn ccw (1) degrees
end
go to x:(150) y:(0)
turn cw (2) degrees
clear
wait (0.1) secs //only for the one that start out at x:-150
repeat until <<touching color [#00FF00]?>or<touching [edge v]?>> //put the right color
move (1) steps
stamp
end
clear
You can then work your way of that, assuming that that's what you want because you still have not made that clear.

Um, I accidentally deleted my copy of that project. (didn't save), so could you upload my copy to Scratch?

http://scratch.mit.edu/projects/TorbyFo … st/2720324

Offline

 

Board footer