Articles on: Blocks Creator
This article is also available in:

🟦 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


  1. A player completes a challenge in an interactive game.
  2. The flow arrives at a Condition block checking if the challenge is successful.
  3. If the condition is true, the flow is redirected to an Assignment block.
  4. The Assignment block modifies the Score variable by assigning it the value 100.
  5. 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 value field automatically adapts to the type of the selected variable (number, text, etc.).

Updated on: 04/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!