forum Forumsplay_arrow Discussions fiber_manual_record Creations

1

How to affect a player who presses a button

1 emerald2 replies77 views
created 01/20/2019 6:40 pm by SpecyMC
last reply 01/21/2019 4:31 am
Not exactly sure if this is in the right forum, if not I apologize.

But quick question. Is there any way I can affect a player who presses a button, and only the person who presses the button. Is there any other command than @p?
Posted by avatar
SpecyMC
Level 1 : New Miner
0

2 replies

2
01/21/2019 4:31 am
Level 5 : Apprentice Architect
Gilran
avatar
Hi!
Maybe. The @s can only use if you have some other filters, specifications. Use coordinates, gamemode, to specify the command. You can use this @p and @s but @s affect on any entity, for example the nearest cow or a dead player.
Use @p with specifications, coordinates, distance and gamemode or use a volume dimensions (dx,dy,dz). You can also use rotation to select player who looking towards the button -> "Horizontal rotation values vary from -180/180 (facing due north), to -90 (facing due east), to 0 (facing due south), to 90 (facing due west), to -180/180 again".
For example: @p[x,y,z,dx,dy,dz,gamemode=] or @p[x,y,z,r=,gamemode=,y_rotation=]
Really helpful to study this page about selectors and commands: minecraft.gamepedia.com/Commands
1
01/20/2019 11:28 pm
Level 38 : Artisan Cowboy
CrazyCowMM
avatar
@s should work, although I'm not a master so I'm not 100% sure.

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome