tuxemon.event.actions.set_variable module

final class tuxemon.event.actions.set_variable.SetVariableAction(var_list)[source]

Bases: EventAction

Set the key in the player.game_variables dictionary.

Script usage

set_variable <variable>:<value>
Script parameters:
  • variable – Name of the variable.

  • value – Value of the variable (if value “today” = today’s date)


var_list (str) –

name: ClassVar[str] = 'set_variable'

Called only once, when the action is started.

For all actions, you will need to override this method.

For actions that only need to run one frame you can simply put all the code here. If the action will need to run over several frames, you can init your action here, then override the update method.

Return type:


var_list: str