Thats actually not going to to fix my problem for that question... What I'm trying to do is that, when a player sets down a pressure plate, it will always detect if a player is standing on that pressure plate. I'm trying to summon a creeper to the pressure plate to blow up the player then. Thanks for helping though.
Thats actually not going to to fix my problem for that question... What I'm trying to do is that, when a player sets down a pressure plate, it will always detect if a player is standing on that pressure plate. I'm trying to summon a creeper to the pressure plate to blow up the player then. Thanks for helping though.
I'm confused as to why you can't just test if the pressure plate is pushed with the functionality of the pressure plate (the pressure plate turns on things it's near) and then use that to spawn a creeper. Why not put a command block under the block under the pressure plate? I'm trying to decide a good way to isolate a player but it seems that is harder.
I'm confused as to why you can't just test if the pressure plate is pushed with the functionality of the pressure plate (the pressure plate turns on things it's near) and then use that to spawn a creeper. Why not put a command block under the block under the pressure plate? I'm trying to decide a good way to isolate a player but it seems that is harder.
Because, the player who has pressure plates can place them virtually anywhere on the map, and I can't exactly cover the enitre bottom layer with command blocks...
Well that bit about the plate being in an arbitrary location changes things! You can use the execute command at any player to do this, but it will also work for any pressure plate, not just ones the player places. Clock a command block with this command, making sure that it is in range of the players involved:
where "Fuse" can have a different value from 0 up in 20ths of a second to control when the Creeper blows. You would have to change the id for the plate depending on what kind of plate it was, that includes the number following it I imagine.
If you have the player's name you can specify which player and not just all, but since you are making a map I assume this works.
This works in my single world, depends on how fast you clock it and all too though.
Well that bit about the plate being in an arbitrary location changes things! You can use the execute command at any player to do this, but it will also work for any pressure plate, not just ones the player places. Clock a command block with this command, making sure that it is in range of the players involved:
where "Fuse" can have a different value from 0 up in 20ths of a second to control when the Creeper blows. You would have to change the id for the plate depending on what kind of plate it was, that includes the number following it I imagine.
If you have the player's name you can specify which player and not just all, but since you are making a map I assume this works.
This works in my single world, depends on how fast you clock it and all too though.
Thanks for the help!
But does anyone know how to do the first 3 questions?
If you test to test how many people are in an area, you could use the testfor command and just read the output of the comparator. For instance, if you type the command /testfor @a, and there are 5 people on your server, the comparator will output a signal strength of 5. Therefore, if you want to test how many people are in a certain area, you just add some location parameters to the @a selector:
testfor @a[x,y,z,r]
This will test for how many people are in a sphere of radius r around the center x,y,z.
As for the replaceitem command, if you want to target the armor slots on mobs, the slot names are slot.armor.name, where name is replace with either head, chest, legs, or feet, depending on where you want to put the armor. As for the hotbar slots, their names are slot.hotbar.slot_number, where slot_number is replaced with the number for whatever slot you want to select. The first slot is slot number 0, and the last slot is slot number 8. So to target the helmet armor slot on a zombie, you could use this command:
If you test to test how many people are in an area, you could use the testfor command and just read the output of the comparator. For instance, if you type the command /testfor @a, and there are 5 people on your server, the comparator will output a signal strength of 5. Therefore, if you want to test how many people are in a certain area, you just add some location parameters to the @a selector:
testfor @a[x,y,z,r]
This will test for how many people are in a sphere of radius r around the center x,y,z.
As for the replaceitem command, if you want to target the armor slots on mobs, the slot names are slot.armor.name, where name is replace with either head, chest, legs, or feet, depending on where you want to put the armor. As for the hotbar slots, their names are slot.hotbar.slot_number, where slot_number is replaced with the number for whatever slot you want to select. The first slot is slot number 0, and the last slot is slot number 8. So to target the helmet armor slot on a zombie, you could use this command:
So, if I needed to testfor, say, 30 people, what would I do? Because I'm pretty sure you can't emit a power of more than 15...
This will require the use of CommandStats, which will return a scoreboard value dependent on the success of a command. While a comparator cannot output a signal greater than 15, command blocks can return a success count to the maximum integer-type limit.
First, an objective is needed in order to store the value:
/scoreboard objectives add COUNT dummy
A fake player can be used to store the score. The target player needs to be tracked on the scoreboard first, so that needs to be done as well:
/scoreboard players set PLAYERS COUNT 0
Stand on top of the /testfor command block and use the following:
/stats block ~ ~-1 ~ SuccessCount PLAYERS COUNT
Whenever the command block is activated, it will set the "COUNT" score of fake player "PLAYERS" equal to the "SuccessCount" of the command block. In this case, "PLAYERS" will have a score equal to the number of players found via /testfor. You can then use another command block to check the score.
For example, testing if that score is 30 or higher (equivalent of 30 or more players found):
This will require the use of CommandStats, which will return a scoreboard value dependent on the success of a command. While a comparator cannot output a signal greater than 15, command blocks can return a success count to the maximum integer-type limit.
First, an objective is needed in order to store the value:
/scoreboard objectives add COUNT dummy
A fake player can be used to store the score. The target player needs to be tracked on the scoreboard first, so that needs to be done as well:
/scoreboard players set PLAYERS COUNT 0
Stand on top of the /testfor command block and use the following:
/stats block ~ ~-1 ~ SuccessCount PLAYERS COUNT
Whenever the command block is activated, it will set the "COUNT" score of fake player "PLAYERS" equal to the "SuccessCount" of the command block. In this case, "PLAYERS" will have a score equal to the number of players found via /testfor. You can then use another command block to check the score.
For example, testing if that score is 30 or higher (equivalent of 30 or more players found):
/scoreboard players test PLAYERS COUNT 30 *
Thanks for the help
Do you by any chance know the answers to the other questions?
Do you by any chance know the answers to the other questions?
For the XP one: you cannot without a large number of command blocks. You'd first detect one player's XP level, and if it matches, reduce another player's level as much as possible and then add the appropriate levels back. This would have to be repeated for every level you intend to track. Example setup:
Force a player that has exactly 1 XP level to reduce a second player's XP level by max. You can change how to determine who player 1 and player 2 is, as I've just used names:
/execute @a[name=Player1,l=1,lm=1] ~ ~ ~ xp -2147483648L @a[name=Player2]
And followed by:
/xp 1L @a[name=Player2]
For PrimedTnt, the "Fuse" tag uses a 'byte' tag-type, which has a maximum value of 127. It reduces by 1 per tick, with 20 ticks per second. Therefore the longest duration of its fuse is 6 seconds on its own. If you need it to last longer, you'll need to use an external clock that constantly changes its Fuse, preventing it from exploding until you turn off the clock:
... While a comparator cannot output a signal greater than 15, command blocks can return a success count to the maximum integer-type limit...
Just a small correction here, comparators technically can output a signal strength higher than 15, but since any dust or repeaters will then reset it down to 15 it's pretty much pointless. But you still can perform subtraction and comparisons with comparators, even if the signal strengths go far above 15.
Rollback Post to RevisionRollBack
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
How do you testfor a certain number of people in a place/certain number of people in general?
How to use /replaceitem to repace an armor slot with a piece of armor that is unbreakable, or has enchantments, or both?
How to set someones exp level to the same level as soneone else's exp lvl?
Less important
How to testfor a person standing on a pressure plate?
How to summon PrimedTnt that doesn't explode, or doesn't explode for a long time?
What slots are used for hotbar, (Needed for /replaceitem)
Thanks in advance for any help
Check my Twitter here for absolutely nothing.
Thats actually not going to to fix my problem for that question... What I'm trying to do is that, when a player sets down a pressure plate, it will always detect if a player is standing on that pressure plate. I'm trying to summon a creeper to the pressure plate to blow up the player then. Thanks for helping though.
Check my Twitter here for absolutely nothing.
I'm confused as to why you can't just test if the pressure plate is pushed with the functionality of the pressure plate (the pressure plate turns on things it's near) and then use that to spawn a creeper. Why not put a command block under the block under the pressure plate? I'm trying to decide a good way to isolate a player but it seems that is harder.
Because, the player who has pressure plates can place them virtually anywhere on the map, and I can't exactly cover the enitre bottom layer with command blocks...
Check my Twitter here for absolutely nothing.
execute @a ~ ~ ~ detect ~ ~ ~ stone_pressure_plate 1 summon Creeper ~ ~ ~ {ignited:1,Fuse:0}
where "Fuse" can have a different value from 0 up in 20ths of a second to control when the Creeper blows. You would have to change the id for the plate depending on what kind of plate it was, that includes the number following it I imagine.
If you have the player's name you can specify which player and not just all, but since you are making a map I assume this works.
This works in my single world, depends on how fast you clock it and all too though.
Thanks for the help!
But does anyone know how to do the first 3 questions?
Check my Twitter here for absolutely nothing.
As for the replaceitem command, if you want to target the armor slots on mobs, the slot names are slot.armor.name, where name is replace with either head, chest, legs, or feet, depending on where you want to put the armor. As for the hotbar slots, their names are slot.hotbar.slot_number, where slot_number is replaced with the number for whatever slot you want to select. The first slot is slot number 0, and the last slot is slot number 8. So to target the helmet armor slot on a zombie, you could use this command:
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
So, if I needed to testfor, say, 30 people, what would I do? Because I'm pretty sure you can't emit a power of more than 15...
Check my Twitter here for absolutely nothing.
This will require the use of CommandStats, which will return a scoreboard value dependent on the success of a command. While a comparator cannot output a signal greater than 15, command blocks can return a success count to the maximum integer-type limit.
First, an objective is needed in order to store the value:
A fake player can be used to store the score. The target player needs to be tracked on the scoreboard first, so that needs to be done as well:
Stand on top of the /testfor command block and use the following:
Whenever the command block is activated, it will set the "COUNT" score of fake player "PLAYERS" equal to the "SuccessCount" of the command block. In this case, "PLAYERS" will have a score equal to the number of players found via /testfor. You can then use another command block to check the score.
For example, testing if that score is 30 or higher (equivalent of 30 or more players found):
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Thanks for the help
Do you by any chance know the answers to the other questions?
Check my Twitter here for absolutely nothing.
For the XP one: you cannot without a large number of command blocks. You'd first detect one player's XP level, and if it matches, reduce another player's level as much as possible and then add the appropriate levels back. This would have to be repeated for every level you intend to track. Example setup:
Force a player that has exactly 1 XP level to reduce a second player's XP level by max. You can change how to determine who player 1 and player 2 is, as I've just used names:
And followed by:
For PrimedTnt, the "Fuse" tag uses a 'byte' tag-type, which has a maximum value of 127. It reduces by 1 per tick, with 20 ticks per second. Therefore the longest duration of its fuse is 6 seconds on its own. If you need it to last longer, you'll need to use an external clock that constantly changes its Fuse, preventing it from exploding until you turn off the clock:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Just a small correction here, comparators technically can output a signal strength higher than 15, but since any dust or repeaters will then reset it down to 15 it's pretty much pointless. But you still can perform subtraction and comparisons with comparators, even if the signal strengths go far above 15.
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
Oh, and when I summon the pressure plate, I want to destroy the pressure plate?
Check my Twitter here for absolutely nothing.