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

#1 2010-07-10 13:28:19

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

Moving Enemies with Scroll?

I'm trying to make it so enemies can move, but they move with the scroll at the same time. Like, it moves a few grid spaces, but if you scroll a little, it'll adjust to that scroll and make sure it doesn't touch a black space. Hope that's not too confusing  tongue  . Help?

Last edited by Sunrise-Moon (2010-07-10 13:28:34)


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

Offline

 

#2 2010-07-10 13:30:20

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Moving Enemies with Scroll?

Look at how its done in this project
http://scratch.mit.edu/projects/archmage/635312


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2010-07-10 13:35:45

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Moving Enemies with Scroll?

Make a variable for each of their x positions, and move that instead of their real X position. Then, put this script in:

http://i31.tinypic.com/2mm7nth.gif

Replace the "2" with whichever frame you want it to be in. So this would be in the second stage length.

You can do the same thing for Y but with 360 instead of 480, and different variables.

Offline

 

#4 2010-07-10 14:12:40

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

Re: Moving Enemies with Scroll?

Oh, OK, thanks! By the way, what's with the views on this thread?

Last edited by Sunrise-Moon (2010-07-10 14:43:40)


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

Offline

 

#5 2010-07-10 14:38:58

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

Re: Moving Enemies with Scroll?

no wonder I can't upload anymore
>=P


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

Offline

 

#6 2010-07-10 14:39:40

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

Re: Moving Enemies with Scroll?

Locomule wrote:

no wonder I can't upload anymore
>=P

Wrong thread?


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

Offline

 

#7 2010-07-10 14:40:13

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Moving Enemies with Scroll?

Sunrise-Moon wrote:

What's with the views?

Sorry?

Offline

 

#8 2010-07-10 14:42:31

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

Re: Moving Enemies with Scroll?

coolstuff wrote:

Sunrise-Moon wrote:

What's with the views?

Sorry?

Huh?


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

Offline

 

#9 2010-07-10 14:43:02

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Moving Enemies with Scroll?

Sunrise-Moon wrote:

coolstuff wrote:

Sunrise-Moon wrote:

What's with the views?

Sorry?

Huh?

What did your post mean? What views?

Ooh, I see. I posted a thread in the Troubleshooting forum about it - hopefully the Scratch Team will catch it.

Last edited by coolstuff (2010-07-10 14:43:26)

Offline

 

#10 2010-07-10 14:48:39

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

Re: Moving Enemies with Scroll?

coolstuff wrote:

Sunrise-Moon wrote:

coolstuff wrote:


Sorry?

Huh?

What did your post mean? What views?

Ooh, I see. I posted a thread in the Troubleshooting forum about it - hopefully the Scratch Team will catch it.

Ok  yikes


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

Offline

 

Board footer