Negated Conditional Branch

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:

You may also like...

14 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 to Zephadus Cancel reply

Your email address will not be published. Required fields are marked *