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?
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?
4
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.
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.
[deleted]
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.
/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.
[deleted]
