1

/testfor help

Flaxcon4397 9/4/16 6:23 pm
557
9/5/2016 2:01 pm
I'm making a map in which you click an item and it spawns a structure. I have it to where you can only spawn it in one space. I was thinking i could use /testfor to detect if you are on one of the two places you can spawn it.

Whenever I try to do it using this command testfor @a[x=-45,y=4,z=1021] and I put a comparater the comparater is always active. Any tips?
Posted by
Flaxcon4397
Level 45 : Master Loremaster
19

  Have something to say?

JoinSign in

6

Bertiecrafter
09/05/2016 12:21 pm
Level 72 : Legendary System
The comparator updates every time you power the command block.
This means that you should hook up that command to a clock in order to make the status update...
Or press the most left button twice (repeat) and the most right button once (Always active)... this tests 20 times a second and is an alternative to a redstone clock. It might get laggy though.
You can also check coords in F3 to see if the comparator is working...
1
TheArchitect_95
09/05/2016 2:01 pm
Level 32 : Artisan Architect
They've already done that.
1
TheArchitect_95
09/05/2016 9:39 am
Level 32 : Artisan Architect
So if you type /testfor @a[x=X,y=Y,z=Z,r=R] where X, Y, Z and R are variables the comparator stays on? Hmm... Silly question but have you checked that the comparator is in comparison mode? I can't think of anything else it could be.
1
Flaxcon4397
09/05/2016 11:02 am
Level 45 : Master Loremaster
testfor @a[x=-45,y=4,z=1021,r=100]
That's the exact copy and pasted command I use. There's the setup I have.
1
TheArchitect_95
09/04/2016 10:09 pm
Level 32 : Artisan Architect
You need to specify a radius, r or a volume, dx, dy and dz.
1
Flaxcon4397
09/05/2016 12:39 am
Level 45 : Master Loremaster
Whenever I try to add a radius it always stays on. (I'm using an always active repeating command block)
1

Welcome