Here are some scripts to get started on a 3D game/story.
The ball on the left is the ball you would use for scripting. It also has (public) variables for its x, y, and z. The x works the same as the real x, so make sure the number is negative. The z is how far away/close it will look when you cross your eyes. Negative means that it looks like it's behind the screen, positive means that it's popping out of the screen.
The ball on the right is a special sprite programmed to go to a certain position based on the other ball's x, y, and z. Don't mess with that one, except for changing out the "Sprite1x," "Sprite1y" and "Sprite1z," and changing the costume.
Some other notes:
Make sure you remember to change out all of the variables based on what x, y, and z its position is referencing from.
Don't worry about resizing the sprite. It is already programmed to resize as needed based on the z. Feel free to change the '3' in "Sprite1z / 3" to whatever you want. It'll measure how much it resizes based on the z.
Make sure whatever x, y, and z variables you use are public. Then if you'd like, any sprite can change the x, y, and z of the one in question.
Let's see some 3D games!
--dov
Comments
You need to be logged in to post comments
Add a Comment
Yes, that does work. But I thought you meant more like real-time shading based on a certain lighting in the room.
yes that would be more realistic but it is at least its better