... 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?
Thanks in advance!
Offline
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?
Thanks in advance!
I think it involves changing the costume based on ScrollX.
Offline
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?
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)
Offline
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)
Offline
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.
Offline
Pehaps this can provide some insight?
Offline
So, it turns out I have done this before: http://scratch.mit.edu/projects/MoreGamesNow/816788
Offline
Kileymeister wrote:
Pehaps this can provide some insight?
It didn’t work.
I think it might be that I’m using velocity?
Offline
I have the answer! In the stage scripts, make the 480's -480s and it works perfectly!
Offline
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.
Offline
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)
Offline
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.
Offline
Look at the link I posted above for a working script.
Offline
MoreGamesNow wrote:
Look at the link I posted above for a working script.
Oh, sorry. I didn’t see that up there.
Testing...
Offline