We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

2

Add /not command.

5 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 2
    Registered User commented
    Comment actions Permalink

    /testfor @e[type= !fox   does not work?

  • 0
    Registered User commented
    Comment actions Permalink

    @blah no it does not. @e[type=!fox] searches for any entities that are not foxes. That would almost always return true unless you have killed every entity that is not a fox.

  • 1
    Registered User commented
    Comment actions Permalink

    This would be a good simple way, but I would suggest adding more control. Remember, commands don't output a single boolean, they output a result and a success count. If this were to be implemented, users would have to choose what to invert, and what would be counted as true and false.
    Sometimes, for example, when running /clear @p glass 0, the command's success is 1, but the result is 0. And should the command block running the /not pass or fail? Maybe something like this:

    /not <result|success> <command: Command>

    would be suitable, allowing the user to control what to invert—the result, or the success.

    But actually, I think that this post on the forum is a better idea—make the inverting of the conditional setting instead. 

    I 100% support this feature request because of the /not command's simplicity to understand, but even if it is implemented, I would advocate for getting the /stats command added to Bedrock Edition's supply. Once you become a more experienced command user, you'll then complain that the /not command doesn't have enough control. Scoreboard values are much easier to manipulate than the /not command will ever give.

  • 0
    Registered User commented
    Comment actions Permalink

    ExpertCoder14 I think that what you have said is a good idea. But to clarify what you said, I am here asking for a command that would negate whether the next chain command block should run if it were set to conditional. I do agree with what you said, since it is especially annoying when commands are redundant or changed so that older things no longer work.

  • 0
    Registered User commented
    Comment actions Permalink

    PenguinManBlue Something went wrong, and the link to the other feedback post wasn't showing up. I meant that instead of a /not command, there could be an additional option in the next command block labelled "Inverse Conditional".