Negated Conditional Branch

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

This script allows you to create negated conditional branches in your events. For example, if your conditional branch tests “if actor exists”, then the negated conditional branch tests “if actor does not exist”.

The purpose is to provide negation logic without having to figure out how to write the condition as a script call.

negateConditionalBranch2

Download

Script: download here

Installation

In the script editor, place this script below Materials and above Main

Usage

To turn a conditional branch into a negate conditional branch, create a
comment before a conditional branch and write

<negate condition>

A number of users have pointed out that this function can be done easily using the “else” branch in the event. The purpose of this script is to allow you to negate the condition, which can be used in many places and not just for regular event processing. The following scripts all support the negated conditional branches, where using the “else” branch is not an option:

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

4 Responses

  1. Zephadus says:

    Forgive me if I overlooked something, but what benefit does this script serve? – Couldn’t you just as easily check a condition, leave the “true” branch empty, and fill in the “else” branch?

  2. Titan says:

    Thank you for this!

  3. Tidus says:

    Really nice 😀

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax