Started by
JohnJohnson
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I'm fairly new to Mrcreator and I'm trying to find a solution to this procedure below. I want the player to bet set into Adventure mode if they leave a specified radius of this block. The only problem I'm having is specifying which player is switched. Thanks!
Event Trigger on Update tick
IF
-Does entitiy exist within square cube radius of type "player"
DO
-Set gamemode of nearest player within cube radius to Survival
ELSE
-set gamemode Adventure
How do you want to specify it?
I'd like to specify it based on individual Persistent Player profiles. That way it knows which player steps outside of the blocks radius. I made a global variable to call on persistent player's, but I couldn't get it to work in my parameter. Thanks for the reply!
Try using a potion effect, if they are in it give it to them, and if they are out, and have the effect, change there gamemode.
I could give that a shot. My main issue is calling on each individual player. The procedure for being "inside the cube radius" only specifies "Nearest Player" not "Player Persistent. I cant find a way to replace "Event/target/entity with an actual player. Hope that makes more sense
I see. Do this, find player in radius, set gamemode, give effect. Only do this if the player doesn't have the effect. Make the effect only stay for about a second. I think this works for what you are trying to do.