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

#1 2011-10-04 19:21:25

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

I looked, and looked, and looked...

... And I couldn’t figure out how to scroll using two sprites. I know how to scroll, and everything, but I don’t know the system where you re-use sprites.

If you know, could you please share?  big_smile

Thanks in advance!


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#2 2011-10-04 19:23:30

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: I looked, and looked, and looked...

henley wrote:

... And I couldn’t figure out how to scroll using two sprites. I know how to scroll, and everything, but I don’t know the system where you re-use sprites.

If you know, could you please share?  big_smile

Thanks in advance!

I think it involves changing the costume based on ScrollX.

Offline

 

#3 2011-10-04 19:30:17

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

Greenatic wrote:

henley wrote:

... And I couldn’t figure out how to scroll using two sprites. I know how to scroll, and everything, but I don’t know the system where you re-use sprites.

If you know, could you please share?  big_smile

Thanks in advance!

I think it involves changing the costume based on ScrollX.

I’m tinkering with that right now.

EDIT: Can’t seem to find a way.

EDIT2: I can get it to change the costume, but I can’t get it to reset it’s position.

Last edited by henley (2011-10-04 19:35:47)


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#4 2011-10-04 20:24:37

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

BUMP!!

Still need help.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#5 2011-10-04 21:05:37

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: I looked, and looked, and looked...

The whole idea is, when sprite "land1" (or whatever name you use) gets to one end of the screen it appears back on the other side... but you probably already knew that.  I had the formula once, let me try to recreate it...

I'd guess (Round( (X/480)-.5) )*480-X or something similar.  You may need to add a "+240" to the X (that is: ( (X+240)/480)...).  Try that out.  The idea is that every 480 steps you move, it increments "Round( (X/480)-.5) )" by 1 and the multiplies that by 480, and then subtracts the already big X.  I hope that makes sense.  Anyway, see if that works.

Last edited by MoreGamesNow (2011-10-04 21:05:53)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#6 2011-10-05 07:11:53

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

I tried using Archmage’s scrolling scripts with sprite re-use, but they didn’t work. The sprites kept overlapping, and they disappeared to quickly, so at least a third of the screen had no ground.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#7 2011-10-05 17:27:24

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

B to the U to the M to the P!!

What does that spell!?!?

BUMP


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#8 2011-10-05 17:38:02

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

Re: I looked, and looked, and looked...

Pehaps this can provide some insight?


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

 

#9 2011-10-05 22:48:52

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: I looked, and looked, and looked...

So, it turns out I have done this before: http://scratch.mit.edu/projects/MoreGamesNow/816788


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#10 2011-10-06 16:28:22

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

Kileymeister wrote:

Pehaps this can provide some insight?

It didn’t work.

I think it might be that I’m using velocity?


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#11 2011-10-06 17:40:02

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

Re: I looked, and looked, and looked...

I have the answer!  In the stage scripts, make the 480's -480s and it works perfectly!


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

 

#12 2011-10-07 23:36:49

lundfamily3
Scratcher
Registered: 2011-09-08
Posts: 500+

Re: I looked, and looked, and looked...

henley wrote:

BUMP!!

Still need help.

OK, if I think I know what you mean, to reset it postion do <go to x sad   )y sad   when <control here> is started. If that isnt what you want, quote me please, or reply.


http://i50.tinypic.com/zn102h.jpg

Offline

 

#13 2011-10-08 09:56:02

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

lundfamily3 wrote:

henley wrote:

BUMP!!

Still need help.

OK, if I think I know what you mean, to reset it postion do [go to x: ( ) y: ( )] when <control here> is started. If that isnt what you want, quote me please, or reply.

That’s not what I meant at all.

I’m using Scrolling, so the [go to x: ( ) y: ( )] doesn’t work.

It was glitching, but Kileymeister already solved the problem.

Last edited by henley (2011-10-08 09:57:13)


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#14 2011-10-08 17:51:44

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

Kileymeister wrote:

I have the answer!  In the stage scripts, make the 480's -480s and it works perfectly!

I tried every combination of which 480’s integers to switch, and none of them worked. Since you didn’t specify which 480’s, I assumed the one that worked the most logically.

But it still didn’t work.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#15 2011-10-08 20:11:44

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

Bump


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#16 2011-10-09 01:15:10

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: I looked, and looked, and looked...

Look at the link I posted above for a working script.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#17 2011-10-09 08:42:25

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

MoreGamesNow wrote:

Look at the link I posted above for a working script.

Oh, sorry. I didn’t see that up there.  tongue

Testing...


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#18 2011-10-09 09:10:22

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: I looked, and looked, and looked...

It works!!!!!!!!!!!!!!!!


big_smile  Thanks MoreGamesNow!!


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#19 2011-10-09 09:48:24

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I looked, and looked, and looked...

Closed by request of owner.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer