Been trying to make it so when a player in my adventure map opens a specific door, it will say a message. So far I've tried these but they dont seem to be working for some reason, and when I open the door, the message WELCOME wont show. (Im a little new to advanced command block commands)
/execute if block 8 63 -86 #minecraft:dark_oak_door[open=true] run say WELCOME
/execute if block 8 63 -86 #minecraft:doors[open=true] run say WELCOME
That is bizarre, can't figure out what I'm doing wrong then, unless its a glitch. is there a specific place on the door that I'm not using my coordinates right or something?
I'm using a command block hidden right in the wall near the door
EDIT: Did a test in a testing world, and tried out another command in /execute, but still running into issues strangely.
Tested
/execute if block 135 4 -242 minecraft:white_wool run say hi
and a few others, but for some reason specifically, the execute command just wont work for me. All other commands in my world seem to be working alright, strangely, but none of them use execute
I mean the world where you can't run the command,with the command written, even the test world is ok. I checked both 6 63 -86 and 135 4 -242 in the world you sent, but it's nothing there.
The answer is simpler than I thought. When you set an impulse command block to always active, it only active once and it won't active again even when you put a redstone torch near it. Set it to need redstone or repeating command block and it will work.
Thank you! It's working, but now I'm not sure how to make it only say the command once. When I set the command block to repeat, how do I make it repeat it as in whenever the door opens, and not the whole time the door IS open?
Set the command in the repeating command block to /execute if block 6 63 -86 #minecraft:doors[open=true] then place a comparator and a impulse command block set to need redstone /say hi.
If you want the command run only once the first time the door is opened, place a conditional chain command block after the repeating command block to fill both command blocks with air or other blocks.
Ok, I think I'm starting to understand, but I think I'm still doing it wrong lol (sorry this is definitely a learning experience for me haha! Thank you and I appreciate the help!)
Thank you so much!! Looks like its working now!! I tried out a few things; My impulse block was positioned differently, and I had a space after the command in the repeat block, and it looks like I had to re-update the block by removing and placing back the redstone block!
Thanks so much for the help! I've learned a lot!!
oh and do you mean the flashing lights? Wasn't sure how to do it with command blocks, but might give it a shot after learning some stuff here.
Been trying to make it so when a player in my adventure map opens a specific door, it will say a message. So far I've tried these but they dont seem to be working for some reason, and when I open the door, the message WELCOME wont show. (Im a little new to advanced command block commands)
/execute if block 8 63 -86 #minecraft:dark_oak_door[open=true] run say WELCOME
/execute if block 8 63 -86 #minecraft:doors[open=true] run say WELCOME
Did I mess up the order of it perhaps??
In the first example you don't need the #. And the second line seems to work for me when I test it. Perhaps the coordinates you have are off slightly?
I re-checked the coordinates and realized I hadn't been looking in the right place on f3 and changed it, but still doesn't seem to be working.
I did
/execute if block 6 63 -86 #minecraft:doors[open=true] run say WELCOME and without # to test
and
/execute if block 6 63 -86 minecraft:dark_oak_door[open=true] run say WELCOME. and without # to test
I tried different coordinates, one on the top half of the door, one on the bottom half of the door, and one under the door, but still to no avail.
I checked your commands, and both working fine for me.
That is bizarre, can't figure out what I'm doing wrong then, unless its a glitch. is there a specific place on the door that I'm not using my coordinates right or something?
Where do you using this command(chat, command block or function)?
I'm using a command block hidden right in the wall near the door
EDIT: Did a test in a testing world, and tried out another command in /execute, but still running into issues strangely.
Tested
/execute if block 135 4 -242 minecraft:white_wool run say hi
and a few others, but for some reason specifically, the execute command just wont work for me. All other commands in my world seem to be working alright, strangely, but none of them use execute
Can you send the world file?
ewe
https://www.dropbox.com/s/1oizs4x0kleuwf4/THE FACILITY MAP WIP VERS.1.zip?dl=0
I'll remove this once the problem's solved, its still in WIP
I mean the world where you can't run the command,with the command written, even the test world is ok. I checked both 6 63 -86 and 135 4 -242 in the world you sent, but it's nothing there.
ewe
That is the world that is having issues, the world I'm making a map in, as well as my testing world but both have the exact same principle.
You spawned in a small room, right? The command block should be next to the door.
I'll redo the spawn point again, and re-upload to make sure.
EDIT: Yup, my bad sorry about that.This should work hopefully. https://www.dropbox.com/sh/dxorj1u1mzr7jw1/AABwfK6d4MOBYe4w06wHsWMMa?dl=0
The answer is simpler than I thought. When you set an impulse command block to always active, it only active once and it won't active again even when you put a redstone torch near it. Set it to need redstone or repeating command block and it will work.
ewe
Thank you! It's working, but now I'm not sure how to make it only say the command once. When I set the command block to repeat, how do I make it repeat it as in whenever the door opens, and not the whole time the door IS open?
For example, it just keeps going
TEST
TEST
TEST
TEST
repeatedly until I close the door.
Set the command in the repeating command block to /execute if block 6 63 -86 #minecraft:doors[open=true] then place a comparator and a impulse command block set to need redstone /say hi.
If you want the command run only once the first time the door is opened, place a conditional chain command block after the repeating command block to fill both command blocks with air or other blocks.
ewe
Ok, I think I'm starting to understand, but I think I'm still doing it wrong lol (sorry this is definitely a learning experience for me haha! Thank you and I appreciate the help!)
Tip for you: Set the repeating command block to Always Active and you don't have to place a redstone block near it.
Setting a command block to Always Active is like place a redstone block near it without giving any effect to other blocks.
ewe
Hmm, ok, did that, but strangely enough, it still doesn't seem to be working.
Edit: Think it could be that the command block isn't triggering the comparator, but not sure why.
That's strange... I use the map you sent, set the blocks at the exact position in the picture and entered the same commands. It worked.
Open the door and send me the pictures of 2 command blocks then send them to me.
Btw, what does your redstone circuit for? Using command blocks instead of redstone can reduce lag a lot.
ewe
Thank you so much!! Looks like its working now!! I tried out a few things; My impulse block was positioned differently, and I had a space after the command in the repeat block, and it looks like I had to re-update the block by removing and placing back the redstone block!
Thanks so much for the help! I've learned a lot!!
oh and do you mean the flashing lights? Wasn't sure how to do it with command blocks, but might give it a shot after learning some stuff here.
Again, thank you so much I really appreciate it!
The direction of the impulse block doesn't matter, the important thing is the space after the command.
The only two case when the direction matters are decoration and combine with chain command block.
ewe