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

#1 2012-07-22 12:16:55

jono3814
New Scratcher
Registered: 2012-07-18
Posts: 17

a moving object while scrolling.

how do you make a moving object work while scrolling, for instance...

you are scrolling and you come across a bunch of spikes that are moving back and forth in a certain space.. to pass you will have to jump over the spikes but they are moving making it harder for the user.

how would you make the spikes do that ???

Offline

 

#2 2012-07-22 13:22:59

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: a moving object while scrolling.

Well, you need another variable called OFFSETX.

Then, for your go block, use

((get your x) + (OFFSETX))
in the x section. Voila! Just adjust OFFSETX to move the spikes.


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#3 2012-07-23 10:08:15

jono3814
New Scratcher
Registered: 2012-07-18
Posts: 17

Re: a moving object while scrolling.

doesnt work... i need it to move horizontally in like a small space... but it has to do it while scrolling... PLs i need help

Offline

 

#4 2012-07-23 11:49:49

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: a moving object while scrolling.

I already showed you on your other thread.  The xoffset will determine where it is.  Just change the xoffset how you want it.   wink

Last edited by berberberber (2012-07-23 11:50:03)


http://i47.tinypic.com/2iaa73k.png

Offline

 

Board footer