|
ArticyXImporter
ArticyXImporter for Unreal Engine
|
Articy:draft features its own scripting language, called articy:expresso, which is used for controlling narrative logic, conditions, and variables. The ArticyXImporter plugin imports these scripts into Unreal Engine, giving developers the flexibility to utilize them in both Blueprint and C++. Additionally, the ArticyFlowPlayer component leverages these scripts when traversing flows, handling conditions and instructions automatically.
This section provides an overview of articy:expresso and how to make use of its scripts within Unreal Engine.
Articy:expresso distinguishes between two types of scripts:
In articy:draft, scripts can be defined in three contexts:
A condition script evaluates to either true or false. An empty condition defaults to true. You can use logical and comparison operators in your conditions. For example:
Condition scripts can be used in various parts of your game logic to control flow or trigger certain actions.
Instruction scripts consist of assignment statements, typically used to modify global variables or call functions. For example:
Instructions can alter global variables, trigger functions, and provide additional flexibility within the game logic.
Articy:expresso scripts can also access and manipulate object properties and template data. There are built-in functions for querying and modifying properties, incrementing and decrementing values, and even generating random values.
Here are some of the key functions:
This function retrieves an object by its technical name or ID:
To access a specific property of an object, use getProp:
You can also access template data:
To change the value of a property:
For template properties:
Increments a property by the specified value:
Generates a random value between the specified range:
The ArticyXImporter plugin brings the power of articy:expresso into Unreal Engine, allowing you to access and manipulate these scripts in both Blueprint and C++.
You can also evaluate conditions and execute scripts when traversing the flow using the ArticyFlowPlayer:
Articy:expresso scripts offer powerful functionality for controlling your game's logic and narrative, from modifying variables to checking conditions. With the ArticyXImporter plugin, these scripts can be used seamlessly within both C++ and Blueprint in Unreal Engine, giving you full control over your game's logic and flow.
For more advanced scripting techniques and working with conditions and instructions in flow traversal, check out the Dialogues and Flow Traversal section.