1

How to affect a player who presses a button

SpecyMC's Avatar SpecyMC1/20/19 6:40 pm
1 emeralds 167 2
1/21/2019 4:31 am
Gilran's Avatar Gilran
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 SpecyMC's Avatar
SpecyMC
Level 1 : New Miner
0

Create an account or sign in to comment.

2

2
01/21/2019 4:31 amhistory
Level 24 : Expert Fisherman
Gilran
Gilran's 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 52 : Grandmaster Cowboy
CrazyCowMM
CrazyCowMM's Avatar
@s should work, although I'm not a master so I'm not 100% sure.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome