Pages: 1
Topic closed
Do you mean the sort order of the sprites?
So objects with a higher z (farther back) are behind objects with a lower z? (in front)
Not easily, you can just let sprites to move back or to the front.
But there's tricks to make it work like with a z number.
http://scratch.mit.edu/projects/Paddle2See/330704
Offline
AddZero wrote:
Do you mean the sort order of the sprites?
So objects with a higher z (farther back) are behind objects with a lower z? (in front)
Not easily, you can just let sprites to move back or to the front.
But there's tricks to make it work like with a z number.
http://scratch.mit.edu/projects/Paddle2See/330704
thanks but what i meant was to make a block that works for z pos.
Offline
Ok, then what do you mean by z position?
What are you trying to do? Are you trying to do 3d?
Scratch is designed for 2d. So you have x and y. You can fake 3d, or the z position and the camera position using tricks. (All Computer 3d is tricks anyway, your computer screen is flat 2d.)
Several of my projects do this, and there's others.
Let me know exactly what you're trying to do and I may be able to help.
Offline
AddZero wrote:
Ok, then what do you mean by z position?
What are you trying to do? Are you trying to do 3d?
Scratch is designed for 2d. So you have x and y. You can fake 3d, or the z position and the camera position using tricks. (All Computer 3d is tricks anyway, your computer screen is flat 2d.)
Several of my projects do this, and there's others.
Let me know exactly what you're trying to do and I may be able to help.
i have squeak and i wanted to know the code to make a z position
Offline
That's cool. Again, what do you mean by z position?
What are you going to do with that z position?
You can make a "z" variable on the sprite how it is.
Again, Scratch is designed for 2d... you can probably make [Change by z] blocks and a (z) variable... By studying the other movement blocks, and copying it, renaming it to z, and taking out the movement code, and just make it change a z position variable. (but i've never done that before.)
But by itself you'll just have a z variable, hard coded into your own version of scratch that's not compatible with normal scratch projects.
Do you want the z position to do something? You can do that without hacking scratch.
When the z position is higher, what will it do?
-Will that sprite go behind other sprites?
-Will it get smaller so it looks like it's going into the distance?
-Both?
If so, you're trying to do 3d. Which is cool. I can try to help you if I know what you're trying to do.
Last edited by AddZero (2008-12-16 10:40:26)
Offline
AddZero wrote:
That's cool. Again, what do you mean by z position?
What are you going to do with that z position?
You can make a "z" variable on the sprite how it is.
Again, Scratch is designed for 2d... you can probably make [Change by z] blocks and a (z) variable... By studying the other movement blocks, and copying it, renaming it to z, and taking out the movement code, and just make it change a z position variable. (but i've never done that before.)
But by itself you'll just have a z variable, hard coded into your own version of scratch that's not compatible with normal scratch projects.
Do you want the z position to do something? You can do that without hacking scratch.
When the z position is higher, what will it do?
-Will that sprite go behind other sprites?
-Will it get smaller so it looks like it's going into the distance?
-Both?
If so, you're trying to do 3d. Which is cool. I can try to help you if I know what you're trying to do.
I really think that the layer function will help you out. Of course, that's probably blindingly obvious... another good thing is to use the size function in accordance to the up/down arrow keys.
Offline
AddZero wrote:
That's cool. Again, what do you mean by z position?
What are you going to do with that z position?
You can make a "z" variable on the sprite how it is.
Again, Scratch is designed for 2d... you can probably make [Change by z] blocks and a (z) variable... By studying the other movement blocks, and copying it, renaming it to z, and taking out the movement code, and just make it change a z position variable. (but i've never done that before.)
But by itself you'll just have a z variable, hard coded into your own version of scratch that's not compatible with normal scratch projects.
Do you want the z position to do something? You can do that without hacking scratch.
When the z position is higher, what will it do?
-Will that sprite go behind other sprites?
-Will it get smaller so it looks like it's going into the distance?
-Both?
If so, you're trying to do 3d. Which is cool. I can try to help you if I know what you're trying to do.
you can't change the blocks i tried it, doesn't work so far,... :^(
Offline
Can someone tell me how to change the size of a sprite while gliding?
Offline
bingbongwong01 wrote:
Can someone tell me how to change the size of a sprite while gliding?
This probably belongs in it's own topic, since it's not really related to the previous discussions. But let me see if I can help here. You could maybe set up a forever loop that sets the size to something related to the X or Y position on the screen. I'm a little short on time right now or I'd make you a sample project. Let me know if you want one.
Offline
Topic closed
Pages: 1