TransWikia.com

How do I test for players in a specific area on Bedrock Edition?

Arqade Asked by ShadowWolf22 on June 14, 2021

I’m trying to make an adventure game, and I’m making springs, but I can’t seem to get the /testfor command to work. What do I do?

One Answer

You need to use /execute

/execute @a[x=6,y=3,z=10,dx=1,dy=0,dz=1] ~ ~ ~ effect @s levitation 1 1 true

Within the target selector @a[] you specify the starter coordinates with x=, y=, z=, and then the distance with dx=, dy=, dz=. the dx dy dz is the difference, so if x=10 and dx=5 you test for an area from 10 to 15, and this works the same for the other once as well both for positive numbers and negative.

Answered by Semlan Bakelsen on June 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP