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

#1 2012-12-07 12:12:59

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Scrolling limits

How do I make it so there are limits to how far you scroll?  I'm using velocity, and using trig to simulate move x steps.


Alt of Firedrake969.

Offline

 

#2 2012-12-07 15:46:01

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Scrolling limits

If your using a colour based sensor just put an invisible wall using the "Set Ghost Effect" block.

It also easier to set the Sroll X/Y if its to high or low.


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#3 2012-12-07 16:06:51

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Scrolling limits

fillergames wrote:

If your using a colour based sensor just put an invisible wall using the "Set Ghost Effect" block.

It also easier to set the Sroll X/Y if its to high or low.

How do I make the scroll x/y not go if it's too high or low?

Last edited by Firedrake969 (2012-12-07 17:05:04)


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#4 2012-12-09 19:03:04

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Scrolling limits

Bump--I need to simulate the If on edge, bounce block, but with scrolling, so I don't know how.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#5 2012-12-10 13:13:45

30-1
Scratcher
Registered: 2012-08-08
Posts: 100+

Re: Scrolling limits

This script may help?:

when gf clicked
forever
 if <(scrollX) < (AMOUNT)>
  set [scrollX v] to (AMOUNT)
 end
 if <(scrollX) > (AMOUNT2)>
  set [scrollX v] to (AMOUNT2)
 end
 if <(scrollY) < (AMOUNT3)>
  set [scrollY v] to (AMOUNT3)
 end
 if <(scrollY) > (AMOUNT4)>
  set [scrollY v] to (AMOUNT4)
 end
I hope it does.  smile

Last edited by 30-1 (2012-12-10 13:14:39)


http://i.imgur.com/ocOya7x.gif
I. Text I Based I Games I

Offline

 

Board footer