Variable Types
Overview
In Sceneri’s Logic Graph, variables play a crucial role in managing data and controlling the behavior of your game. Understanding the different variable types available allows developers to effectively store, manipulate, and retrieve information throughout their game logic. This article provides an overview of the variable types supported in Sceneri, enabling you to make informed choices when designing your scripts.
Supported Variable Types
Boolean
- Description: Boolean variables represent a binary value, either true or false.
- Use Cases: Commonly used for conditions in if statements, toggle states, or flags indicating whether a certain condition has been met (e.g., player is alive, door is open).
Integer
- Description: Integer variables store whole numbers without decimal points.
- Use Cases: Ideal for counting occurrences, managing scores, or handling indexes in arrays.
Float
- Description: Float variables store numbers that can have decimal points, allowing for greater precision.
- Use Cases: Useful for handling continuous values, such as health points, speed, or distances.
String
- Description: String variables are used to store text data.
- Use Cases: Suitable for names, dialogue, messages, or any other textual information that needs to be displayed or processed.
Vector
- Description: Vector variables represent a point in 2D or 3D space and are often composed of multiple components (e.g., x, y, z).
- Use Cases: Essential for positioning objects, movement direction, or calculating distances between points in your game world.
Entity
- Description: Name variables are specifically designed to represent human-readable identifiers, typically used to label entities or objects.
- Use Cases: Useful for assigning and displaying unique names to characters, items, or any in-game elements that require clear identification.
Color
- Description: Color variables store color values, often defined by components such as red, green, blue, and alpha (RGBA).
- Use Cases: Ideal for defining the colors of objects, UI elements, or visual effects within your game.
Array
- Description: Array variables are collections of values, allowing you to store multiple items of the same type.
- Use Cases: Useful for managing lists of objects, such as inventory items, scores, or any set of similar data that needs to be accessed or iterated over.
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.