Conducttr Engine Smartwords
You can achieve a lot with Conducttr engine smartwords and functions but it's usually for pro-users and often those using Colibri where you can add calculations.
While the {} smartwords make life easier for commonly-used data, there's a lot more you can do by directly accessing the Conducttr Engine. These smartwords use the || delimiters instead of {}. Please note that you can't use the two together. The rest of this article might get a bit complicated for some but even if you don't understand it completely, you might still be able to use the recipes.
Audience Responses
To capture the player's response to the last question, you can use:
|audience.response|
Note that this only survives the immediate use after the question. If you want to store the response, you'll need to save it in a variable using a calculation.
Arrays
Arrays are like tables with two columns: the left column is the index and the right column is the data. You use the index to access to data.
Symbols
[ ] denotes an array
( ) denotes a function
| | denotes a smartword
{ } a short form for some smartwords
Indexes
Most indexes are in quotes " " because we want Conducttr to use that actually text. Without the quotes Conducttr will try to find a variable of that name.
The exercise Smartwords table is actually an array that internally is called the "custom_data" array.
If you're writing content to use the custom_data array, writing something like {data.stadium}
is the easiest approach but you could also write |partition.custom_data["stadium"]|
- they both mean the same.
Conducttr maintains the following arrays:
Nested Smartwords
Note that this is an advanced feature and not for the fainthearted ;)
Nested smartwords allows authors to create more dynamic experiences by using variables to access the data in other variables.
Example
Let's say you ask the player to choose a song and store the answer in a player variable called "music".
Normally to access this variable we would use {music}.
To nest the smartword you need to use the || notation. Hence the player variable "music" will become |partition.variables[CONCAT("a.",audience.hash,".music")]|
But lets say we want to use the the value in "music" to access some data in the custom data table. To do this we will use this expression:
|partition.custom_data[partition.variables[CONCAT("a.",audience.hash,".music")]]|
Last updated