2

HELP PLEASEannouncement

DEV42developer 3/16/23 2:56 pm history
189
3/16/2023 5:12 pm
so basicly im making a horror map but i need to activate the commands right? so i put a pressure plate on it but the worst thing is that it has a sound can the command activate and not make a sound?? like make a invisible block or anything that will trigger the command PLEASE HELP PLEASE if you know send a command on it and tell me how to use it!
Posted by
DEV42developer
Level 2 : Apprentice Explorer
1

  Have something to say?

JoinSign in

7

A Lost Boy
03/16/2023 5:09 pm
He/They • Level 33 : Artisan Explorer Magical Boy
history
here's how I do that kind of thing:
execute as @a[r = 3] run <COMMAND_TO_RUN>
Place a REPEATING command block that is ALWAYS ACTIVE with this command exactly one block below the surface block. That way, there can be a block above the command block to hide it. The way it works is by checking for someone within a radius of 3 blocks.

IMPORTANT: The command will continue to execute until the player steps off the area. If you want the command to be triggered only once, like a pressure plate, then simply replace the command with the following:
testfor @a[r = 3]
And add a comparator next to the command block that triggers an IMPULSE command block with the command you want to run set to NEEDS REDSTONE.

edit: in Java Edition, you may need to replace "r =" with "distance ="
1
Juillyoom
03/16/2023 5:12 pm
He/Him • Level 54 : Grandmaster Birb Skinner
hey uh, i helped him understand clearly what helmo craft said, im sorry but there's no need for this anymore, also note he's on java, still thanks for tryna help
1
Helmo2019
03/16/2023 3:33 pm
Level 22 : Expert Explorer
You can use the following command:

execute positioned <BLOCK POSITION> if entity @p[distance=..1] run <YOUR COMMAND>

<BLOCK POSITION> -- The coordinates the player needs to be at
@p[distance=..1] -- Maximum distance to of the player. distance= needs to be replaced with r= in Bedrock Edition. You can change the 1 to any number you like, the larger it is, the further away the player can be to be detected.
<YOUR COMMAND> -- Any command you like, for example a command placing a redstone block next to another command block to activate a chain of commands.
2
DEV42developer
03/16/2023 3:36 pm
Level 2 : Apprentice Explorer
hi thanks for the command but i need a java command so yeah
1
Juillyoom
03/16/2023 4:07 pm
He/Him • Level 54 : Grandmaster Birb Skinner
oh my god, he's saying a way for java and how to make it for bedrock,

if you'd read it carefully, and maybe have more knowledge in commands,

you'd clearly get what he's saying, and how to do it




now, i will explain you in a simpler way:

1. get the exact position the pressure plate was

2. in the command block dont remove the command you wanted to do, instead before the main command type this:

execute positioned [HERE TYPE THE POSITION OF THE PRESSURE PLATE] if entity @p[distance=..2] run [HERE THERE SHOULD BE YOUR COMMAND]

hope it helped
1
DEV42developer
03/16/2023 4:15 pm
Level 2 : Apprentice Explorer
ohhh i tho it was for bedrock cuz i saw some videos on testfor? i think it was called it was a command how you are saying

sorry and thanks
2
MrJakkar
03/16/2023 3:22 pm
Level 8 : Apprentice Explorer
Just lead a redstone path from some door or other item that provides redstone signal that the player will have to interact with to make progress. That way you will avoid the sound issue since it will be caused by said player intentional action and will not feel unnatural/break immersion.
1

Welcome