1

Command Block Help

shloosh •11/15/14 8:43 pm
•
520
•
11/22/2014 7:10 am
Hello. How do I specify a not statement with numbers and command blocks.
Example: testfor @a[score_newplayer_min=!1,score_newplayer=!1]
would be true if the dummy variable newplayer was anything but 1. The above code doesn't work for numbers, though. So is there any way to do that. Maybe json?
Posted by
shloosh
Level 1 : New Miner
0

  Have something to say?

Join • Sign in

4

HecticGamers
• 11/22/2014 7:10 am
• Level 16 : Journeyman System
Try doing:
testfor @a[score_newplayer=1]
or:
testfor @a[score_newplayer=0]

If they don't work then either I've misread what you are trying to do or something else.
1
anonpmc1656136
• 11/19/2014 12:28 am
• Level 9 : Apprentice Miner
[deleted]
1
shloosh
• 11/15/2014 9:24 pm
• Level 1 : New Miner
I set the dummy variable to newplayer with the command:
/scoreboard objectives add newplayer dummy New_Player
and set it to display on the sidebar with:
/scoreboard objectives setdisplay sidebar newplayer

My problem is in that the default state of a new objective is null. So when a new player joins, they get assigned that variable newplayer with a null state. I want to trigger a command as soon as they join, but have no way to test for that null state, so I thought maybe I could test for any value that isn't 1 (so null would be included in these values) and then set that value to 1 when I'm done so the command doesn't recursively trigger.
1
anonpmc1656136
• 11/15/2014 9:02 pm
• Level 9 : Apprentice Miner
[deleted]
1

Welcome