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

#1 2011-09-05 01:31:05

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Help! Mario scroller fail!!

Sorry for spam, but i have the potential to make a great game but i need help!
I'm working on a mario game, and If you test out the game for yourself, you'll see that you can't get ahold of the red mushroom that comes out of the box. I tried so hard to fix this and I just do not know how. Pease can anyone help me??? It would be much appreciated. I not only want to be able to grab the mushroom, but to make it move seamlessy with the scrolling template (as mario is walking). Thanks!

here's the project:

http://scratch.mit.edu/projects/Zparx/2013346


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#2 2011-09-05 13:00:13

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Help! Mario scroller fail!!

this belongs in all about scratch. ill move it for you.

Offline

 

#3 2011-09-05 14:22:15

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

Re: Help! Mario scroller fail!!

I see you're problem.  You should create two new variables (for the mushroom specifically) , named maybe ScrollXPosition.  Whenever you want to change its x position, instead change ScrollXPosition.

So where you put "change x position by (x)"  you would put "change ScrollXPosition by (x)"

Now make a script like this:
When Green Flag Clicked
Forever
Set X Position to (xscroll + ScrollXPosition)
/Forever

And then it should be fixed!

Note:  You'll also have to set ScrollXPosition to 175 when the green flag is clicked to place it correctly over the box.

Last edited by Kileymeister (2011-09-05 14:23:46)


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

 

Board footer