Hello, I'm making a 3D game by stamping, but the stamps are covered by other sprites behind the stamper. I did make the stamper go to front, but the stamps wont go to front. See my project here: http://scratch.mit.edu/projects/ArloarLoLs/2748722
When the car is on the race track(other sprites), the race track overs the stamps the car makes, please take a look at my project's scratch blocks and post a helpful reply.
Thanks you.
Offline
zammer990 wrote:
Unfortunately stamps only cover the background, all sprites will cover them.
So is there any way to fix this?
Offline
ArloarLoLs wrote:
zammer990 wrote:
Unfortunately stamps only cover the background, all sprites will cover them.
So is there any way to fix this?
The only way is to stamp the sprites too. This is actually easier to do as a 1s1s since the order in which you stamp them is important, and when you want things to run sequentially, 1s1s is great!
Offline
MoreGamesNow wrote:
ArloarLoLs wrote:
zammer990 wrote:
Unfortunately stamps only cover the background, all sprites will cover them.
So is there any way to fix this?
The only way is to stamp the sprites too. This is actually easier to do as a 1s1s since the order in which you stamp them is important, and when you want things to run sequentially, 1s1s is great!
What does 1s1s mean?
Offline
ArloarLoLs wrote:
MoreGamesNow wrote:
ArloarLoLs wrote:
So is there any way to fix this?The only way is to stamp the sprites too. This is actually easier to do as a 1s1s since the order in which you stamp them is important, and when you want things to run sequentially, 1s1s is great!
What does 1s1s mean?
1 sprite, 1 script
Offline
powerpoint56 wrote:
ArloarLoLs wrote:
MoreGamesNow wrote:
The only way is to stamp the sprites too. This is actually easier to do as a 1s1s since the order in which you stamp them is important, and when you want things to run sequentially, 1s1s is great!What does 1s1s mean?
1 sprite, 1 script
Ok, so i duplicate the sprite?
Offline
no, you combine the sprites into one. it can be very complicated
(see the wiki)
Offline
thebriculator wrote:
no, you combine the sprites into one. it can be very complicated
(see the wiki)
Wow thats really complicated.
Offline
Well, it doesn't have to be only one sprite and one script. You can create a sequence of broadcasts that avoids multi-threading (having multiple scripts run at the same time). You would just use a bunch of "broadcast and wait" commands to break up a large script into several smaller scripts, possibly across multiple sprites. This can function identically to a 1s1s project.
Last edited by amcerbu (2012-08-27 21:55:33)
Offline
amcerbu wrote:
Well, it doesn't have to be only one sprite and one script. You can create a sequence of broadcasts that avoids multi-threading (having multiple scripts run at the same time). You would just use a bunch of "broadcast and wait" commands to break up a large script into several smaller scripts, possibly across multiple sprites. This can function identically to a 1s1s project.
True. The nice thing about "broadcast and wait" is that your scripts will still run sequentially.
[/response]
The more you practice at combining sprites into one, the easier it gets. The most straight-forward approach is to have a ton of variables that store what each sprite would originally store, and then render each sprite as normal (see below). A list can make things easier (or more complex ). Of course, it is a little trickier than that for most projects (for instance, storing all the costumes means that the costume's numbers get messed up). As amcerbu pointed out, you can use multiple sprites to break things into simpler chunks and keep costume numbers the same, but in the end you'll be doing about the same thing: breaking all rendering into a specific order and then stamping images in that order.
set [sprite1 x v] to (100) set [sprite2 costume # v] to (4) set [sprite 6 y v] to (-45) go to x:(sprite1 x) y:(sprite1 y) point in direction (sprite1 direction) switch to costume (sprite1 costume) stamp go to x:(sprite2 x) y:(sprite2 y) point in direction (sprite2 direction) switch to costume (sprite2 costume) stamp
Offline
MoreGamesNow wrote:
ArloarLoLs wrote:
zammer990 wrote:
Unfortunately stamps only cover the background, all sprites will cover them.
So is there any way to fix this?
The only way is to stamp the sprites too. This is actually easier to do as a 1s1s since the order in which you stamp them is important, and when you want things to run sequentially, 1s1s is great!
But 1s1s projects make the script REALLY long and hard to follow. I find it easier to have one sprite, and several scripts for different purposes and one main script with a bunch of broadcast and wait blocks in it. When there is a lot of scripts I make more sprites and put different scripts in different sprites depending on what they are for.
Offline
amcerbu wrote:
Well, it doesn't have to be only one sprite and one script. You can create a sequence of broadcasts that avoids multi-threading (having multiple scripts run at the same time). You would just use a bunch of "broadcast and wait" commands to break up a large script into several smaller scripts, possibly across multiple sprites. This can function identically to a 1s1s project.
So one sprite is going to get separate with by scripts running at the same time from 2 threads? (Broadcasting)
Offline