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

#1 2010-09-02 22:38:21

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Make a Sprite Follow a Line

Actually, I know how to make a sprite follow a line- my problem is that if both the up and down sensor are activated at the same time, the sprite will get stuck. How can I fix this?


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#2 2010-09-02 22:43:42

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Make a Sprite Follow a Line

Well, I'd have to see the project to help, but you could just put a giant if around all your smaller ifs that say if not both touching and have the move block outside it.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2010-09-02 22:49:30

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Make a Sprite Follow a Line

AtomicBawm3 wrote:

Well, I'd have to see the project to help, but you could just put a giant if around all your smaller ifs that say if not both touching and have the move block outside it.

http://scratch.mit.edu/projects/Sunrise-Moon/1278023

Download and put sprite 2 on the big black line.


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#4 2010-09-03 01:40:37

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Make a Sprite Follow a Line

I did this with as few alterations to your original method as I could manage...
path AI for Sunrise-Moon

Last edited by Locomule (2010-09-03 01:41:20)


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#5 2010-09-03 01:49:23

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Make a Sprite Follow a Line

Locomule wrote:

I did this with as few alterations to your original method as I could manage...
path AI for Sunrise-Moon

Thank you!


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#6 2010-09-03 02:06:44

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Make a Sprite Follow a Line

No problem, glad to help. This was fun to work on and like I said, you did most of the work. Besides, this is yet another game routine I've been planning to do forever and just hadn't gotten around to yet. Peace!


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#7 2010-09-04 00:56:01

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Make a Sprite Follow a Line

Locomule wrote:

No problem, glad to help. This was fun to work on and like I said, you did most of the work. Besides, this is yet another game routine I've been planning to do forever and just hadn't gotten around to yet. Peace!

Someone already made a game from what you taught  yikes

http://scratch.mit.edu/projects/RocksAndFire/1279822


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#8 2010-09-04 18:33:57

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Make a Sprite Follow a Line

Unfortunately, some of my Scratch downloads do not work and this is one of them.
I did reply though and gave you credit as well  smile


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

Board footer