Editing Event Reference

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1,435: Line 1,435:
* <code>set_player_name jimmy:richard:linus</code> (random choice among jimmy, richard and linus)
* <code>set_player_name jimmy:richard:linus</code> (random choice among jimmy, richard and linus)


=== set_random_variable ===
=== set_player_template ===
Set the key in the player.game_variables dictionary with a random value.
 
'''Parameters'''
* <code>variable</code>: Name of the variable.
* <code>values</code>: Multiple values of the variable separated with ":".
 
'''Examples'''
* <code>set_random_variable alpha,one:two:three</code> (variable "alpha" can be "alpha:one" or "alpha:two" or "alpha:three").
 
=== set_template ===
Switch template (sprite and combat_front).
Switch template (sprite and combat_front).


Line 1,455: Line 1,445:


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>sprite</code>: must be inside mods/tuxemon/sprites, eg: adventurer_brown_back.png -> adventurer
* <code>sprite</code>: must be inside mods/tuxemon/sprites (default = original), eg: adventurer_brown_back.png -> adventurer
* <code>combat_front</code>: must be inside mods/tuxemon/gfx/sprites/player, eg: adventurer.png -> adventurer (optional)
* <code>combat_front</code>: must be inside mods/tuxemon/gfx/sprites/player, eg: adventurer.png -> adventurer (optional)


'''Examples'''  
'''Examples'''  
* <code>set_template player,adventurer,adventurer</code>
* <code>set_template player,adventurer,adventurer</code>
=== set_random_variable ===
Set the key in the player.game_variables dictionary with a random value.
'''Parameters'''
* <code>variable</code>: Name of the variable.
* <code>values</code>: Multiple values of the variable separated with ":".
'''Examples'''
* <code>set_random_variable alpha,one:two:three</code> (variable "alpha" can be "alpha:one" or "alpha:two" or "alpha:three").


=== set_tuxepedia ===
=== set_tuxepedia ===

Please note that all contributions to Tuxepedia are considered to be released under the Creative Commons Attribution-ShareAlike (see Tuxepedia:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)