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

#1 2012-06-03 07:55:39

SimplyMelee
Scratcher
Registered: 2012-01-14
Posts: 100+

Hi, car game help needed!!

Well I'm making a game where you are in a car driving along a barren area killing enemies while doing so. I've played games where they have the background move as you do so and that's exactly what I need! Can anyone tell me how to make one of these or show me a file from a game like that that I can download?


http://oi48.tinypic.com/2czzjol.jpg

Offline

 

#2 2012-06-03 08:20:14

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: Hi, car game help needed!!

I predict you are talking about scrolling, are you after X axis scrolling or Y axis scrolling? if you are after x axis scrolling (right to left) check out some of my test scrollers, f you need help i can surely help! Scrolling is not too hard, but you have got to get a hold of it!


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#3 2012-06-03 08:56:54

SimplyMelee
Scratcher
Registered: 2012-01-14
Posts: 100+

Re: Hi, car game help needed!!

weell mine's from an aerial point of view so I would be using both!


http://oi48.tinypic.com/2czzjol.jpg

Offline

 

#4 2012-06-03 09:07:30

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: Hi, car game help needed!!

ok, Scrolling X is really simple, basically you need a variable called 'ScrollX'
and you iput this script on each sprite you want to scroll

forever
set x to (ScrollX)+(48*(0))
each time you add a sprite to scroll, you need to chage the *0 by 1 (add 1)
P.S sorry for the horrible input of scratch code, i am not good with it, hope it helped!


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#5 2012-06-03 09:12:43

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Hi, car game help needed!!

daniel_j wrote:

ok, Scrolling X is really simple, basically you need a variable called 'ScrollX'
and you iput this script on each sprite you want to scroll

forever
set x to ((ScrollX) + ((480) * (0)))
each time you add a sprite to scroll, you need to chage the *0 by 1 (add 1)
P.S sorry for the horrible input of scratch code, i am not good with it, hope it helped!

Fixed [your v] (scripts)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#6 2012-06-03 12:43:17

ExtremelyGamer
Scratcher
Registered: 2012-03-11
Posts: 1000+

Re: Hi, car game help needed!!

SciTecCf wrote:

daniel_j wrote:

ok, Scrolling X is really simple, basically you need a variable called 'ScrollX'
and you iput this script on each sprite you want to scroll

forever
set x to ((ScrollX) + ((480) * (0)))
each time you add a sprite to scroll, you need to chage the *0 by 1 (add 1)
P.S sorry for the horrible input of scratch code, i am not good with it, hope it helped!

Fixed [your v] (scripts)

I always wondered, why do you need the scrollx + 480 * 0, when you can do scrollx + 0


"Submarines are like water like underwater airplanes" O_o

Offline

 

#7 2012-06-03 12:52:15

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Hi, car game help needed!!

ExtremelyGamer wrote:

SciTecCf wrote:

daniel_j wrote:

ok, Scrolling X is really simple, basically you need a variable called 'ScrollX'
and you iput this script on each sprite you want to scroll

forever
set x to ((ScrollX) + ((480) * (0)))
each time you add a sprite to scroll, you need to chage the *0 by 1 (add 1)
P.S sorry for the horrible input of scratch code, i am not good with it, hope it helped!

Fixed [your v] (scripts)

I always wondered, why do you need the scrollx + 480 * 0, when you can do scrollx + 0

So you can copy that for the other scrolling sprites, and simply change the "0" to "1" and so on.

Offline

 

#8 2012-06-04 00:07:38

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: Hi, car game help needed!!

SciTecCf wrote:

daniel_j wrote:

ok, Scrolling X is really simple, basically you need a variable called 'ScrollX'
and you iput this script on each sprite you want to scroll

forever
set x to ((ScrollX) + ((480) * (0)))
each time you add a sprite to scroll, you need to chage the *0 by 1 (add 1)
P.S sorry for the horrible input of scratch code, i am not good with it, hope it helped!

Fixed [your v] (scripts)

Thanks for the help with the code!, haha i have never been good at it xD


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

Board footer