tuxemon.event.actions.copy_variable module

final class tuxemon.event.actions.copy_variable.CopyVariableAction(var1, var2)[source]

Bases: EventAction

Copy the value of var2 into var1 (e.g. var1 = var 2).

Script usage

copy_variable <var1>,<var2>
Script parameters:
  • var1 – The variable to copy to.

  • var2 – The variable to copy from.

  • var1 (str) –

  • var2 (str) –

name: ClassVar[str] = 'copy_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:


var1: str
var2: str