π¦ Assign
π¦ Assign
The Assignment block allows you to modify the value of a variable during an experiment. It is essential for dynamically updating data like a score, counter or any other information stored in a variable.
This block completely replaces the previous value of the variable with the new value provided, which distinguishes it from other blocks like Increment which modify an existing value without overwriting it.
π₯ Entries
- in (Flux): Block trigger. When the flow reaches this point, the target variable is updated.
- variable (Variable): Variable to modify (can be of type Text, Number, Option, Image, File, etc.).
- value (Dynamic type): New value which will replace the old one. The type automatically adapts to that of the selected variable.
π€ Outings
- out (Flow): Activates immediately after modifying the variable, allowing the flow to continue.
π‘ Example of use
Scenario: Updating a player's score after a success
- A player completes a challenge in an interactive game.
- The flow arrives at a Condition block checking if the challenge is successful.
- If the condition is true, the flow is redirected to an Assignment block.
- The Assignment block modifies the
Scorevariable by assigning it the value100. - The flow continues to a Display block to inform the player of their new score.
βοΈ Technical Details
- Behavior of variables: The previous value of the variable is completely overwritten by the new value provided. For operations like increment, use the Increment block instead.
- Dynamic adaptation: The
valuefield automatically adapts to the type of the selected variable (number, text, etc.).
Updated on: 04/03/2026
Thank you!
