#How can i make a multiplayer checkpoint system?

1 messages · Page 1 of 1 (latest)

rough ledge
#

can someone plss help me with a multiplayer checkpoint system cuz im losing my mind

rough ledge
#

that works if a gold block is under u

mighty birchBOT
#

-# (helpers summoned) <@&1166082198152159386> <@&1202694677766348840>

rough ledge
#

i mean i waited 30m

#

no one came...

low kindle
#

so... just if you step on a gold block, your spawnpoint gets set?

rough ledge
#

yes

rough ledge
#

when u got onn it

#

its hard

low kindle
#

uhm just do execute as @a at @s if block ~ ~-1 ~ gold_block run spawnpoint @s

rough ledge
#

im gonna try

#

sec

rough ledge
#

when i did it for a telrraw it spams it

low kindle
#

yeah well that constantly runs the command, íf you need to avoid it, i recommend also giving the player a tag when they step on the gold block using the same method, and before that line do execute as @a[tag=!YOURTAG] at @s if block ~ ~-1 ~ gold_block run tellraw...

frigid schooner
#

or a score if you have multiple checkpoints

low kindle
#

and just have unique tags for each checkpoint like checkpoint1, 2, 3

rough ledge
#

scoreboard?

low kindle
#

score also works but tags are simpler

#

and it seems like you might want the simple method

rough ledge
#

ok

frigid schooner
#

scoreboard yes, but it really depends on context of your checkpoints

#

with just a few checkpoints, tags are fine

rough ledge
#

i have alot of checkpoints for parkour leavels

#

like 20

#

for 1 level

low kindle
#

both are fine, there is no difference

rough ledge
#

i have a couple..

low kindle
#

but well, you have another problem

rough ledge
#

...

#

why are datpaacks so hard...

frigid schooner
#

I imagine there is definitely some performance impact, checking a score value (that is always singular) or iterating an array that potentially grows to a size of 100+ if you have that many checkpoints.

low kindle
#

no please stop

rough ledge
#

there isnt a simpler methos?

#

method

low kindle
#

yes there are

#

so i'm guessing you dont want to have separate lines for each checkpoint

rough ledge
#

yes

low kindle
#

then hold on

rough ledge
#

k

low kindle
#

oh yeah we can do it with one tag

#
execute as @a[tag=!checkpoint] at @s if block ~ ~-1 ~ gold_block run tellraw...
execute as @a[tag=!checkpoint] at @s if block ~ ~-1 ~ gold_block run spawnpoint @s ~ ~ ~
execute as @a at @s unless block ~ ~-1 ~ gold_block run tag @s remove checkpoint
execute as @a at @s if block ~ ~-1 ~ gold_block run tag @s add checkpoint```
#

pretty unpolished but it'll work

#

hopefully

rough ledge
#

ima test

frigid schooner
#

yes

low kindle
#

yeah

frigid schooner
#

it will not repeat as long as you stand on the gold block, but it will repeat if you step off and on (each time)

rough ledge
#

WROSK

#

WORKS

#

THANK YOUUUUU

#

OMG

#

tyysmsmm m<333

#

im so happy rn

low kindle
#

happy to help

rough ledge
#

i actually been trying this for 1 and a half hours

low kindle
#

oh ! 😭

rough ledge
#

even chagpt couldnt help

#

TYYYY

mighty birchBOT
rough ledge
#

ty again @low kindle

mighty birchBOT
mighty birchBOT
low kindle
#

bro 😭

#

@rough ledge pls close it again i didnt know it would reopen from reacting 💀