Discuss Scratch

CookieCrums1
Scratcher
16 posts

3 dimensions

I'm making a game called Dimension Mayhem, and I'm trying to make a upgrade where you get a third dimension, does anyone know how? (Just to clarify, its a upgrade, so you get it later on at level 6)
bluedragon8633
Scratcher
1000+ posts

3 dimensions

You'll have to explain what you mean by “getting a third dimension” and possibly provide a link to the project. If you want to create a 3D project, griffpatch has a well-made raycasting tutorial on YouTube with accompanying Scratch starter projects.
CookieCrums1
Scratcher
16 posts

3 dimensions

https://scratch.mit.edu/projects/790204691/

I have it so when you press the space button, the world alters. but on level 6, I want it so you can press it twice before you go back to the first dimension ei a third dimension
legendary34678
Scratcher
1000+ posts

3 dimensions

Assuming you are controlling which dimension is currently active using a variable, you can do this:

set [dimension v] to [1] //Starts in dimension 1

set [dimension v] to (((dimension) mod (3)) + (1)) //Use this to switch to the next dimension
The second block will change dimension by 1. But, if dimension + 1 = 4, it will move it back down to 1. That way, you can switch from 1 to 2, 2 to 3, and 3 to 1 without issue. Simply change 3 to however many dimensions you have.
CookieCrums1
Scratcher
16 posts

3 dimensions

I made it work based off of your help because I don't know how to use the “mod” thing. But thanks none the less!
medians
Scratcher
1000+ posts

3 dimensions

CookieCrums1 wrote:

I made it work based off of your help because I don't know how to use the “mod” thing. But thanks none the less!

Last edited by medians (Feb. 2, 2023 00:48:19)

Powered by DjangoBB