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

#1 2011-12-15 17:04:15

philiparh
New Scratcher
Registered: 2011-12-02
Posts: 2

Need help with scroll

http://scratch.mit.edu/projects/philiparh/2197184

The link above goes to my project. I am trying to make the zombie move. The problem is , if i try to change scroll, the whole background moves, and if i only change x and y (of the zombie), it is imposilbe to get away from him ( for the main guy). Also, if i kill the zombie, how can I make him stop moving and stay where he is?

Offline

 

#2 2011-12-15 18:45:33

fuz50
Scratcher
Registered: 2008-09-19
Posts: 100+

Re: Need help with scroll

I looked at your project. I love the idea of it!

I see what you mean by it would be impossible to get away from him. If you were to use the "move ( ) steps" block, the zombie would move closer to the main guy because he would be facing him.

However, your main guy is stationary. Forget about the moving background, the guy himself is not moving because he does not react to ScrollX and Y.

To allow the guy to get away from the zombie, don't even let the zombie think about changing scroll X or Y. All that those variables have to do with is the background. Instead, all the zombie needs to do is to react when the arrow keys are pressed. This an extremely easy way to get to the zombie, and is extremely easy to program.

Which is... (I downloaded your project, as you can see)

https://lh3.googleusercontent.com/-deBlig800iY/TuqFg6Rti0I/AAAAAAAAAJY/N5ZGnoO69LI/s466/zombie.gif

Voila. This should allow you to move away from the zombie while making it a lot simpler. This should also solve your problem with your zombie moving when you kill him. You'll probably have to substitute a few of your scripts, but that shouldn't be a problem.

Hope I helped.  wink

PS. I think this belongs in All About Scratch...  tongue


http://img10.imageshack.us/img10/7404/cooltext529102298.jpg
http://siggen.toontown-click.de/sig1.pnghttp://siggen.toontown-click.de/sig2.png

Offline

 

#3 2011-12-22 19:40:40

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: Need help with scroll

fuz50 wrote:

PS. I think this belongs in All About Scratch...  tongue

Sure does.  smile

But we have the same thread in All About Scratch, let's keep everything tidy and use one thread.smile


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

Board footer