The Meaning of Life, the Universe, and Everything.
Join Date:
6/20/2012
Posts:
59
Member Details
How would you test to see if you are in range of a villager (in range 5). Could you set a variable (lets say test) to a value of 1 if this is true? and 0 if it is false?
Been getting stuck on this, and any help would be great!
Rollback Post to RevisionRollBack
I do armor stand animations using command blocks, check out my channel you won't regret it!
Been getting stuck on this, and any help would be great!
I do armor stand animations using command blocks, check out my channel you won't regret it!
https://www.youtube.com/channel/UCm1v07Q3vCq6V2P7_yuFUeg
/execute @e[type=Villager,r=5] ~ ~ ~ scoreboard players set @a test 1
(since you spelled villager wrong, and had wrong order on scoreboard, and few other mistakes).
But this still seems to not work, I go in range of it and its on a super fast clock and it doesnt detect it
I do armor stand animations using command blocks, check out my channel you won't regret it!
https://www.youtube.com/channel/UCm1v07Q3vCq6V2P7_yuFUeg
Please? Any1 know how? I want it so when I am within 5 range of a villager my score (called test) gets set to 1.
Its the last step in a mini game I have been working on:S
I do armor stand animations using command blocks, check out my channel you won't regret it!
https://www.youtube.com/channel/UCm1v07Q3vCq6V2P7_yuFUeg
/execute @p ~ ~ ~ testfor @e[type=Villager,r=5]
then have a comparator from that command into this one
/scoreboard players set @p Test 1
then have a redstone torch hanging from that command block into this command
/scoreboard players set @p Test 0
Here's a picture to clarify
Thank you so much, even posting the pic as an extra, very helpful:)
I do armor stand animations using command blocks, check out my channel you won't regret it!
https://www.youtube.com/channel/UCm1v07Q3vCq6V2P7_yuFUeg
As the example will only work in a singleplayer environment, you can use the following for multiple players:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/