this post was submitted on 04 Aug 2024
22 points (100.0% liked)

Minecraft

4451 readers
17 users here now

Welcome to the Minecraft community on Lemmy and Kbin!

The home for all posts related to the Minecraft franchise: from the classic game to the mobile ports, mods, adventure games, merchandise and similar!

Official Lemmy.world server available!

Lemmy.world hosts an official server that welcomes all players to contribute and have fun:

Minecraft Version: 1.20.x

Address: minecraft.lemmy.world

Please make sure you read our rules before posting.

Rules:

Rules can be clicked on to be expanded.

1: Treat all users with respect.

Bullying, threathening, doxxing, or toherwise hostile behaviors with any of our users will not be tolerated. Be civil, have fun.

2: Posts must be related to the Minecraft franchise.

This includes the main game, titles like Dungeons, fan art, wiki pages, toys, new feature votes, and similar content.

3: No advertising.

If you want to share a product you're a manufacturer or seller of, please contact the moderation team first. Affiliate links to online shopping stores or affiliate coupon codes are not allowed.

4: No piracy.

Links or discussions about cracked versions of games, unauthorized copies of copyrighted material and other similar piracy-related content are not allowed.

5: No NSFW or adult content.

This community is inclusive to users of all ages. Keep in mind Minecraft attracts children and adults alike. Therefore, no NSFW content is allowed.

6: No low-effort meme content.

Memes are allowed, and so are comics or other fan creations. However, low-effort reposts and otherwise overused memes will be removed.

Reddit reposts are allowed.

Reddit reposts are allowed, but you need to include the tag [Reddit] in the title.

Related communities:

founded 2 years ago
MODERATORS
 

Trying to see if I can add a turn based movement system.

The only way I can think of is by setting a worldborder centered on a player for their turn.

But theres a few problems: No vertical limiting, other players could use it if they are close enough, it looks kind of ugly and the border is square (yes I know minecraft is square)

:-)

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 2 points 4 months ago (1 children)

Kind of like an RPG where you only get given lets say, 7 meters.

I'm not really trying to limit the area, but instead the distance. So it would make a theoretical circle of movement.

I only mention squares because worldborders are square, not bad, but probs could be better.

Also, since it's turn based, it would be nice to have only one person move at a time.

Hope u get well soon :-]

[โ€“] [email protected] 2 points 4 months ago* (last edited 4 months ago)

I figured out a couple of commands for you to keep the player in a certain radius. It does this by teleporting a marker entity to your position every tick, but only within the radius of the sphere, so once the player leaves the sphere a second command can teleport the player back to the marker. These commands can be run in repeating command blocks or a function. Here's the commands necessary:

Load Commands (run once)

/tag username add constrained
Adds a tag to the player to keep them in this spot. If you have multiple players you'll need to set up a system with multiple tags or teams or something similar. you can also change the target selector to whatever you want.


/execute at username run summon marker ~ ~ ~ {Tags:["pos"]}
Summons a marker at the player that will be used to track their location. You can change the target selector as well as the tag for this one, just make sure to keep the tags consistent.

Tick Commands (run every tick)

execute positioned x y z as @e[type=marker,tag=pos,distance=..7] if entity @a[tag=constrained,distance=..7] run tp @a[tag=test,distance=..7,limit=1]
Runs as the closest marker with the tag pos inside a 7 block spherical radius centered around a chosen location. If a player with the tag constrained is found within this radius, the marker is teleported to the player. Make sure to change the x, y, and z coords to a location of your choice, you can change the radius to something other then 7, and you can change the tag names.


execute positioned x y z as @a[tag=constrained,distance=7..,limit=1] run tp @e[type=minecraft:marker,tag=pos,limit=1]
Runs as the closest player with the tag constrained outside a 7 block spherical radius. If found, it teleports the player to a marker entity with the tag pos inside of the 7 block radius. Make sure to change the x, y, and z coords to a location of your choice, you can change the radius to something other then 7, and you can change the tag names.


See if this works for you. If it doesn't, let me know, or just try a different method.