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

#1 2009-12-01 18:37:10

Kilux
Scratcher
Registered: 2009-12-01
Posts: 3

Scratch Scroller Game -Help Me.

Alright so I am working on a scratch scrolling game, so far i'm only testing stuff out.

I want my character to go to a certain spot when green arrow is clicked but if you know how the scrolling works (I can post the game if you request) you will know that the sprite in which the character will 'go to' when the 'green arrow' is clicked will also move along with the background. I want to know how to make the 'spawn place' to stay on the map, in one spot.

My initial idea was a red X drawn on the background I don't know if you can but I was thinking like;

'When green arrow is clicked
' [If]<Not>(Touching Color Red)
' (Go To (map1) )
' Touch color red? or something.

The scrolling background method I am using is found here:
http://scratch.mit.edu/forums/viewtopic.php?id=2440

and if needed I will upload the project. If Anyone would be so kind as to help me, or if you need clarification on what I mean, feel free to post.
you may be able to tell that i'm not 'pro' at Scratch, but i'd like to get to know it a bit more, so please help me. -Thanks.

Offline

 

#2 2009-12-01 20:41:41

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: Scratch Scroller Game -Help Me.

Do you want to sprite to go to a certain place on the screen, no matter the scrolling position, or go to a certain scrolling position no matter the place on the screen? I think it is the first one.

If so, just separate that particular sprite from scrolling (Don't put the scrolling script on the sprite) and set it to your wanted Postion.

It would help to see the project so that we can see what you are asking for.

I hope that this has helped!

Offline

 

#3 2009-12-01 21:10:27

Kilux
Scratcher
Registered: 2009-12-01
Posts: 3

Re: Scratch Scroller Game -Help Me.

Ok well I uploaded the test and here it is;
http://scratch.mit.edu/projects/Kilux/785408
Your advise, I understand but once you take a look at the code I'm pretty sure your idea wont work, i've tried to do just that my way and it didn't have any luck. If you notice the X is moving with the background since that's what moves, not the cat. But please look over it and i'll be ready to take a second attempt with your advise.

Offline

 

#4 2009-12-01 21:50:50

Ssbrawl700
Scratcher
Registered: 2009-02-11
Posts: 100+

Re: Scratch Scroller Game -Help Me.

So u want the cat to go to the far left of the map whenever green is clicked?

If so all u got to do is add a "set scrollx to 'whatever the variable number is when u are there" to the bottom of a "when flag click"

I'm pretty sure u would have to set scrollx to -490


Can you beat the ever-so challenging Keyboard Khaos?

Offline

 

#5 2009-12-01 21:58:22

Kilux
Scratcher
Registered: 2009-12-01
Posts: 3

Re: Scratch Scroller Game -Help Me.

Well that seems to work for the most part, thanks for the help I appreciate it.

Offline

 

#6 2009-12-02 22:58:33

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Scratch Scroller Game -Help Me.

it might help looking at the tutorial for scrolling in my sig

Offline

 

Board footer