Logic Nodes
Overview
Logic nodes in Sceneri’s Logic Graph are used to perform logical operations, enabling you to control decision-making processes and build complex game behaviors. These nodes work with Boolean values (true/false) and are essential for creating conditions that affect gameplay. This article provides an overview of the available logic nodes in Sceneri, explaining their functionality and common use cases.
Available Logic Nodes
Or
- Description: The Or node checks multiple Boolean conditions and outputs true if at least one of the conditions is true. If all conditions are false, the output will be false.
- Use Cases: Useful for scenarios where any one of several conditions should trigger an action. For example, if the player is in a dangerous area or low on health, trigger an alert.
Not
- Description: The Not node inverts a Boolean value, outputting true if the input is false and false if the input is true.
- Use Cases: Commonly used to create “opposite” conditions. For instance, if you want to check whether a player is notin a certain area or not carrying an item, you can use the Not node to flip the input condition.
Negate
- Description: The Negate node changes the sign of a numeric value, turning positive numbers negative and vice versa.
- Use Cases: Useful for reversing values, such as changing the direction of movement or flipping the effect of an action. For example, if a force is applied in one direction, Negate can reverse it for opposing forces.
Exclusive Or (XOR)
- Description: The Exclusive Or (XOR) node outputs true if only one of the two Boolean inputs is true. If both inputs are true or both are false, the output is false.
- Use Cases: Often used in situations where only one condition should be true for a specific action to occur. For example, XOR can be used to allow only one type of event (such as either a day or night cycle) to be active, but not both simultaneously.
And
- Description: The And node outputs true only if all connected Boolean conditions are true. If any of the conditions are false, the output will be false.
- Use Cases: Ideal for situations where multiple conditions need to be met before proceeding. For instance, if a player needs a key and permission to access a restricted area, both conditions can be checked with the And node.
Conclusion
Logic nodes are fundamental for creating responsive and interactive gameplay in Sceneri’s Logic Graph. By combining nodes like Or, Not, Negate, Exclusive Or (XOR), and And, developers can build complex conditional logic that brings depth to their game mechanics. Using these nodes effectively will enhance your ability to create dynamic, engaging experiences in Sceneri.
Feedback
Please be sure to submit issues or feature requests through the embedded feedback form. In the event it is a major issue please contact us directly through Discord.