Editing Creating Custom Events

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 4: Line 4:
The Tuxemon event engine begins by first loading all of the events defined in the currently loaded map. After all the map's events have been loaded, the event engine will, ''every frame'', loop through each event and check to see if all the conditions for that event are <code>True</code>. If each condition returns <code>True</code>, it will execute all of the actions defined in that event in order (e.g. <code>act1</code>, <code>act2</code>, etc.).
The Tuxemon event engine begins by first loading all of the events defined in the currently loaded map. After all the map's events have been loaded, the event engine will, ''every frame'', loop through each event and check to see if all the conditions for that event are <code>True</code>. If each condition returns <code>True</code>, it will execute all of the actions defined in that event in order (e.g. <code>act1</code>, <code>act2</code>, etc.).


http://i.imgur.com/6LvZrBv.png
[http://i.imgur.com/6LvZrBv.png]


The actual ''methods'' that define ''what'' to check for (in the case of conditions) or ''what'' to execute (in the case of actions) are all defined in the <code>core.components.event</code> module. '''Any method defined in this module will be available for you to use in the map editor.''' When Tuxemon is first initialized, the event engine will go through this module and make ''all'' the methods available as conditions or actions to execute during the main loop. Because of this, you '''must ensure that all new method names are unique'''.
The actual ''methods'' that define ''what'' to check for (in the case of conditions) or ''what'' to execute (in the case of actions) are all defined in the <code>core.components.event</code> module. '''Any method defined in this module will be available for you to use in the map editor.''' When Tuxemon is first initialized, the event engine will go through this module and make ''all'' the methods available as conditions or actions to execute during the main loop. Because of this, you '''must ensure that all new method names are unique'''.

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)