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)
Offline
Well, since you're putting the
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:150y:0
orgo to x:150y:0repeat untiltouching ?ortouchingedge ▼?move1stepsstamp
go to x:150y:0repeat untiltouching ?ortouchingedge ▼?move1stepsstamp
Last edited by TorbyFork234 (2012-08-07 19:39:50)
Offline
coolhogs wrote:
I need the repeat (180) thing...
![]()
What's the problem then?
Last edited by TorbyFork234 (2012-08-07 19:44:18)
Offline
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
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
Try this for both (keeping the color change)
You can then work your way of that, assuming that that's what you want because you still have not made that clear.whenclicked
go to x:-150y:0or 150clearpoint in direction-90or 90 (depending on what sprite)repeat360stampturn
1degreesgo to x:150y:0turn
2degreesclearwait0.1secsonly for the one that start out at x:-150repeat untiltouching color ?ortouchingedge ▼?put the right colormove1stepsstampclear
Last edited by TorbyFork234 (2012-08-07 20:28:05)
Offline
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
whenclicked
point in direction90 ▼repeat180go to x:150y:0turn
1degreesrepeat untiltouching color ?ortouchingedge ▼?move1stepsstamp
Last edited by PencilFactory (2012-08-08 10:55:06)
Offline
TorbyFork234 wrote:
Try this for both (keeping the color change)
You can then work your way of that, assuming that that's what you want because you still have not made that clear.whenclicked
go to x:-150y:0or 150clearpoint in direction-90or 90 (depending on what sprite)repeat360stampturn
1degreesgo to x:150y:0turn
2degreesclearwait0.1secsonly for the one that start out at x:-150repeat untiltouching color ?ortouchingedge ▼?put the right colormove1stepsstampclear
Um, I accidentally deleted my copy of that project. (didn't save), so could you upload my copy to Scratch?
Offline
coolhogs wrote:
TorbyFork234 wrote:
Try this for both (keeping the color change)
You can then work your way of that, assuming that that's what you want because you still have not made that clear.whenclicked
go to x:-150y:0or 150clearpoint in direction-90or 90 (depending on what sprite)repeat360stampturn
1degreesgo to x:150y:0turn
2degreesclearwait0.1secsonly for the one that start out at x:-150repeat untiltouching color ?ortouchingedge ▼?put the right colormove1stepsstampclearUm, I accidentally deleted my copy of that project. (didn't save), so could you upload my copy to Scratch?
Offline