Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Scrollx
- dowcwow
- Scratcher
67 posts
Scrollx
how do I do that scrollx that doesn't show what ahead of you like in this project: http://scratch.mit.edu/projects/10118230/
- birchyboii
- Scratcher
100+ posts
Scrollx
that project uses tile generation not scroll. You could put a small black border sprite around the edge, or put in a script that when scrollx is less than or more than a value it hides
- dowcwow
- Scratcher
67 posts
Scrollx
<iframe allowtransparency=“true” width=“485” height=“402” src="http://scratch.mit.edu/projects/embed/11267271/“ frameborder=”0" allowfullscreen></iframe>
- birchyboii
- Scratcher
100+ posts
Scrollx
ok its not allowing me to open stuff again! -_- just put In each terrain, if scroll x is bigger than (the number when it just goes of your screen) hide
repeat this for the right and left direction :p
repeat this for the right and left direction :p
- dowcwow
- Scratcher
67 posts
Scrollx
[img<div style=“text-align: center;”>
<object type=“application/adobe flash” id=“ad” base=“imageshack.com” width=“400” height=“300” scale=“noscale” salign=“LT” >
<a href="http://scratch.mit.edu/projects/11267271/#comments-14520460“ target=”_blank“ title=”New Super Mario Bros.“>D:\Pictures\New mario.png<img src=”D:\Pictures\New mario.png“ alt=”New Super Mario Bros.“ /><br />Play Game</a>
<!– end thumbnail –>
</object><br />
<!– link code, helps support our community –>
<a href=”http://www.sploder.com“ target=”_blank“ style=”font-size: x-small; color: #999; text-decoration: none;“ title=”New Super Mario Bros.">Play game</a>
</div>
<object type=“application/adobe flash” id=“ad” base=“imageshack.com” width=“400” height=“300” scale=“noscale” salign=“LT” >
<a href="http://scratch.mit.edu/projects/11267271/#comments-14520460“ target=”_blank“ title=”New Super Mario Bros.“>D:\Pictures\New mario.png<img src=”D:\Pictures\New mario.png“ alt=”New Super Mario Bros.“ /><br />Play Game</a>
<!– end thumbnail –>
</object><br />
<!– link code, helps support our community –>
<a href=”http://www.sploder.com“ target=”_blank“ style=”font-size: x-small; color: #999; text-decoration: none;“ title=”New Super Mario Bros.">Play game</a>
</div>
- CrystalStar-
- Scratcher
100+ posts
Scrollx
ok its not allowing me to open stuff again! -_- just put In each terrain, if scroll x is bigger than (the number when it just goes of your screen) hide
repeat this for the right and left direction :p
He's basically saying, in each terrain sprite, add something like this:
if scrollx > value [
hide
] else [
show
]
- dowcwow
- Scratcher
67 posts
Scrollx
ok its not allowing me to open stuff again! -_- just put In each terrain, if scroll x is bigger than (the number when it just goes of your screen) hide
repeat this for the right and left direction :p
He's basically saying, in each terrain sprite, add something like this:
if scrollx > value [
hide
] else [
show
]
Ok, thanks! I'm gonna see if that works.
- dowcwow
- Scratcher
67 posts
Scrollx
ok its not allowing me to open stuff again! -_- just put In each terrain, if scroll x is bigger than (the number when it just goes of your screen) hide
repeat this for the right and left direction :p
He's basically saying, in each terrain sprite, add something like this:
if scrollx > value [
hide
] else [
show
]
Ok, thanks! I'm gonna see if that works.
Yeah… that doesn't work
- Psiborg
- Scratcher
500+ posts
Scrollx
This is my current scrolling tile project: http://scratch.mit.edu/projects/11818189/
All the scrolling code is in the Game sprite - however so is the rest of the game engine so it won't be too easy to read I'm afraid. Basically the theory behind it is that you create a grid of tile clones that is one grid bigger than will fit on the screen. When any tile moves off the edge of the screen, you move it to the opposite edge and change its costume to whatever is coming into view on that side of the screen. To make it fullscreen (instead of having a border), you need to define your costumes to have a 20 pixel transparent border, so that you can move the tile completely offscreen.
Any questions, just shout.
All the scrolling code is in the Game sprite - however so is the rest of the game engine so it won't be too easy to read I'm afraid. Basically the theory behind it is that you create a grid of tile clones that is one grid bigger than will fit on the screen. When any tile moves off the edge of the screen, you move it to the opposite edge and change its costume to whatever is coming into view on that side of the screen. To make it fullscreen (instead of having a border), you need to define your costumes to have a 20 pixel transparent border, so that you can move the tile completely offscreen.
Any questions, just shout.
Save the world from giant ants in a classic tower defense: Antfestation
Protect the Minions from the Purples in Minion Push
Collect treasure across the beautiful islands of Mylands
Guard your gold in The Hoard++
Remake of a classic arcade game: Descentipede
- Discussion Forums
- » Help with Scripts
- » Scrollx