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

#1 2011-11-17 20:57:22

ianplumlee
New Scratcher
Registered: 2011-11-17
Posts: 2

Increase scrolling speed of consecutive levels?

Ok, so I am working on a scrolling helicopter combat game for school and I was curious about one thing:

How do you make the scrolling speed of consecutive levels increase?

I know that there has to be a variable for the level and that variable has to be incremented every time you complete a level but I'm not sure how to make the scrolling speed of the background increase.

Thanks ahead of time!!

Ian

Offline

 

#2 2011-11-17 21:02:19

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Increase scrolling speed of consecutive levels?

Well, you can do something very similar to what you do with the level: just make a variable! Wherever you have the terrain sprites moving along horizontally, use a variable to determine the speed. You could even have the speed tied to the level number; for example, it could be equal to a base speed plus the level number times something.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-11-17 21:27:39

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: Increase scrolling speed of consecutive levels?

http://i41.tinypic.com/11abmz6.png


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#4 2011-11-17 21:41:01

ianplumlee
New Scratcher
Registered: 2011-11-17
Posts: 2

Re: Increase scrolling speed of consecutive levels?

Thanks guys!  I haven't had a chance to implement these suggestions yet but I'll get back to you as soon as I have and let you know how they work.

Offline

 

#5 2011-11-18 00:47:06

Xzerie
New Scratcher
Registered: 2010-09-08
Posts: 11

Re: Increase scrolling speed of consecutive levels?

You could make a variable for the level's number and multiply it by a base amount

<change x by( (( <{ level# }> <*> 1.1 ))

Offline

 

Board footer