Map Event Changes

Avatar

By bitcraft 22 Jun 2017 21:39

Champion · 140 comments

After some talks on the github and IRC, I began making changes to the Map Events to support more simple programming.  Actions and Conditions are still used, and likely will not change, but the way Actions are processed has changed.

Before, all actions would be completed before the next game frame.  With my latest changes, actions can now run as long as they need to, without the need to complete before the next frame.  Actions after a long-running one will now "wait" for others.  For example, it is now possible to open multiple dialogs, do a battle, or any other type of long running "script", without the need to chain it together using several Events.

Here is a possibility for actions now:

act1 dialog Hey, want to battle me?  I won't take no for an answer!
act2 dialog_choice Yes No
act3 start_battle npc_jerk
act4 dialog Hey, you cheated!  No fair!

Currently, I have only implemented the "long running" action for a few actions like dialogs and battle.  All other ones will behave like normal, for example, set_variable will complete in one frame, as well as other "instant" actions.  If an action does not need to run for more than one frame, the game will execute all actions that are "instant", so action lists will operate as they did before.

These changes are almost ready to be merged into the development branch.  If you've got any comments, please let me know!

Last edited by bitcraft (22 Jun 2017 21:40)