Im making a prison style map without the cells or shops and the map'll be called Mining Simulator. Everytime you get a certain amount of xp levels, you move up a mine, but theres a problem, everytime a player gets the amount of xp, the nearest player towards the command block gets teleported and not the person who gets the required amount of xp (unless they were the closest to the command block). For example, jeff gets the 10 xp to move on to mine 2, but jeff doesnt get teleported because bob was teleported because he was the closest to the command block even though bob had 4 xp, is there any command to fix this, im quite new to commands
If you were on 1.13+ you could use the new syntax for execute command:
/execute as @p[lm=10] at @s run tp x y z
and chain the other commands.
on 1.12 instead you could put a repeat command with
/tag add @a[lm=10] level10
and then attach a chain conditional command block with
/tp @a[tag=level10] x y z
and use the condition [tag=level10] for anything you want those player to do (titles ecc..). It's IMPORTANT to put a command block to remove the tag with the command
/tag remove @p[tag=level10] level10
or the people with that tag will continuously get teleported
You'll be able to use the same method for the other level goals. I didn't test it, I hope it works. <3
i should've mentioned that im on bedrock, /tag isn't a thing, and that execute command you gave me doesn't work, can i do this with /scoreboard by any chance?
doesn't work, i want everyone who gets 10xp to get teleported to mine 2 and everyone who gets 30xp gets teleported to mine 3 and so on, thats it, i just want a command(s) that teleports them to the next mine as soon as they get the required amount of xp
Your original commands will work with some modification.
The target selection arguments for your testfor, the title, and tp should contain xyz and area numbers for a single level of the mine, and lm should be the target level to advance to the next mine.
Now copy that setup once for each level
That way it's only looking for players in level 1 that have 10 levels, and only looking in mine 2 for players with 20. Without the coordinates it's looking for anyone in the server with 10 or more levels, so the comparator just stays on
Im making a prison style map without the cells or shops and the map'll be called Mining Simulator. Everytime you get a certain amount of xp levels, you move up a mine, but theres a problem, everytime a player gets the amount of xp, the nearest player towards the command block gets teleported and not the person who gets the required amount of xp (unless they were the closest to the command block). For example, jeff gets the 10 xp to move on to mine 2, but jeff doesnt get teleported because bob was teleported because he was the closest to the command block even though bob had 4 xp, is there any command to fix this, im quite new to commands
I'm assuming your making the mistake of using the @p selector. Easy fix.
/execute @e[type=player,lm=lvl] ~~~ teleport @e[type=player,lm=lvl] (To your desired location)
that does work now but, theres now another problem, as long as some one has 10+ xp in the server, no one else will get teleported......
Im right now using 3 command blocks and 1 comparator;
Repeat - Comparator - Impulse - Chain
Repeat: testfor @p [lm=10]
Comparator
Impulse: Title @e[type=player , lm=10] title Lvl 10 Reached!
Chain: execute @e[type=player , lm=10] ~ ~ ~ teleport @e[type=player , lm=10] 11 4 -5
If you were on 1.13+ you could use the new syntax for execute command:
and chain the other commands.
on 1.12 instead you could put a repeat command with
and then attach a chain conditional command block with
and use the condition [tag=level10] for anything you want those player to do (titles ecc..). It's IMPORTANT to put a command block to remove the tag with the command
or the people with that tag will continuously get teleported
You'll be able to use the same method for the other level goals. I didn't test it, I hope it works. <3
Sincerely yours,
Fether.
i should've mentioned that im on bedrock, /tag isn't a thing, and that execute command you gave me doesn't work, can i do this with /scoreboard by any chance?
I don't really know much about bedrock edition but I think using teams would be a good idea
Sincerely yours,
Fether.
You should be able to use the l target selector to confine it to that level.
I don't totally understand your issue though.
Two questions.
Are you wanting this for a specific area?
If there is a specific area is there ever going to be someone with more xp than what you're looking at?
If the answer to the first one is YES and the second is NO run:
/execute @e[type=player , lm=10] ~ ~ ~ teleport @e[type=player,lm=10,x=xMin,y=yMin,z=zMin,dx=xArea,dy=yArea,dz=Zarea] 11 4 -5
This will allow it so you only apply the teleport to players in the desired area. Let me know if this works for you.
doesn't work, i want everyone who gets 10xp to get teleported to mine 2 and everyone who gets 30xp gets teleported to mine 3 and so on, thats it, i just want a command(s) that teleports them to the next mine as soon as they get the required amount of xp
Your original commands will work with some modification.
The target selection arguments for your testfor, the title, and tp should contain xyz and area numbers for a single level of the mine, and lm should be the target level to advance to the next mine.
Now copy that setup once for each level
That way it's only looking for players in level 1 that have 10 levels, and only looking in mine 2 for players with 20. Without the coordinates it's looking for anyone in the server with 10 or more levels, so the comparator just stays on
Man just copy and paste the x,y,z and dx,dy,dz portions into the front and the end and it will 100% work unless you're doing it wrong.
Im convinced you didn't run that command correctly.
i know nothing about commands, whats dx, dy , and dz?
Dx,dy,dz. Is the length or area for the dimensions x, y, and z.
So find the most negative coordinate of your mine and plug that coordinate in for your x, y, and z.
Then you can count the distance across your level in blocks for the x, y, and z coordinates. Those values are what you plug into dx, dy, and dz
If you still don't get it I can inv you to my realm and show you or vice versa
my gamertag is "Aptprototype"