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

#1 2011-07-05 16:14:23

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

how do u make an enemy move in a scrolling game?

im making a mario game but cant get my enemys to move since its a scrolling game can anyone help  hmm


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#2 2011-07-05 16:38:46

Sphingo
Scratcher
Registered: 2011-07-01
Posts: 87

Re: how do u make an enemy move in a scrolling game?

May I ask what is a scrolling game?  hmm

Offline

 

#3 2011-07-05 17:01:51

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

A scrolling game is a scrollX game (check out examples scrolling project). Okay rojscratches, get the enemy sprites to just move slowly toward the sprite OR say this. When Flag Clicked forever set x to (variable) scrollX + 480*0. If you want to add one more enemy then for the second do 480*1, each new sprite increases the 480*a number. These solutions might work, if not, then sorry I tried to help.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#4 2011-07-05 18:59:37

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

Archmage's projects are a great resource for learning to make platform games!


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#5 2011-07-05 19:47:50

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

I checked out Archmage's project, the one you linked, but it didn't really help with my trouble. Can you maybe go to Ball Picker download it and check the problem? I am having serious issue with it.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#6 2011-07-05 19:58:44

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

Simple- assign your enemy sprites a new variable, like EnemyScrollX.  Then put in this script:
http://i52.tinypic.com/n2c27l.gif
The 0 in the first block is where your sprite will start in the game.

Now to make the enemy sprite move, instead of "change x by ()", use "change EnemyScrollX by ()".  Like to make it walk back and forth, you can do this:
http://i52.tinypic.com/15n3htv.gif

Last edited by Kileymeister (2011-07-05 19:59:05)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#7 2011-07-05 19:59:09

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

Re: how do u make an enemy move in a scrolling game?

Thescratch3 umm if you just did that programming you told me the enemies wouldnt move  cool


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#8 2011-07-05 20:02:48

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

Re: how do u make an enemy move in a scrolling game?

thanks Kileymeister ill try that and its kind of wierd that you are the only scratcher instead of new scratcher that posted on this topic  big_smile


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#9 2011-07-05 20:08:03

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

rojasscratches wrote:

thanks Kileymeister ill try that and its kind of wierd that you are the only scratcher instead of new scratcher that posted on this topic  big_smile

sad  I was trying to help


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#10 2011-07-05 20:08:06

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

Re: how do u make an enemy move in a scrolling game?

btw how did you get blocks that were so perfect and not detatched in any way  hmm


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#11 2011-07-05 20:11:18

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

Re: how do u make an enemy move in a scrolling game?

Thescratch3 wrote:

sad  I was trying to help

I know and ill try whatever anyone says to see if it works  wink


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#12 2011-07-05 20:18:59

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

Okay. Besides, the post before Kileymeister I was talking to fullmoon.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#13 2011-07-05 20:23:49

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

rojasscratches wrote:

btw how did you get blocks that were so perfect and not detatched in any way  hmm

You can save a picture of a sprite's scripts in the Scratch program by right-clicking some empty space in the scripts section and selecting "save picture of scripts", then upload that to an image site, then paste the text into your post.

It's kind of a drawn-out procedure, but I feel it's worth it to get a really clear picture.

Last edited by Kileymeister (2011-07-05 20:24:06)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#14 2011-07-05 20:47:03

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

Oh, I thought you used the blocks below posts  tongue . Anyway, (wait I already said the main thing about this post)


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#15 2011-07-06 15:06:30

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

Re: how do u make an enemy move in a scrolling game?

Thescratch3 wrote:

Oh, I thought you used the blocks below posts  tongue . Anyway, (wait I already said the main thing about this post)

You can use either its just cooler to have a clear image  wink


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#16 2011-07-07 19:41:43

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do u make an enemy move in a scrolling game?

I was talking to Kileymeister.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

Board footer