Topic category: Help with MCreator software
So I'm trying to make an underwater pressure system, so that the lower you go the higher a custom 'pressure' variable gets. So far I'm trying to get this working in an overlay, where I've been able to get the overlay to appear when the player is in water. The problem is, when I've tried to alter the pressure value It hasn't worked. The way I have it set up is to -
check if the player is in water
if true, display PRESSURE_GUI
> check if the player's Y level is below a certain threshold - e.g. Y=64
if true, set PRESSURE_VAR to 1
else, set PRESSURE_VAR to 0
So far that hasn't worked, and I'd like to have a system that doesn't require me to individually alter the pressure value for each Y level, but I can't think of how to do this.
Any help would be greatly appreciated, though be warned, this has caused me many headaches
Just to add, I'm running a procedure that (on a player tick update) runs the above code
I think that is a bad way to check the pressure and implement it as a whole.
I made this it took me like 5 or 6 minutes i think anyway it's very basic but i could make it so the pressure isn't just effected by the amount of water you are under but all so effected by your Y cord value.
just so it makes more sense but yea reply to me what you want and i will get back to you. :)
remember the x y z entity cords are messed up they get fixed in 2020.4 version of MCreator.
but my procedure will work if you are in an ocean, but if you are in a area 1x1 filled with water it won't work because the bug.
I got bored but i think that this is the simplest way to make this work well feel free to modify this i Don't take any official rights over this.
Hey, thank you. I tried this and it works, although when the player ascends the pressure value doesn't decrease and stays on the highest value