summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'res/scripts')
-rw-r--r--res/scripts/map1_off_right.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/res/scripts/map1_off_right.lua b/res/scripts/map1_off_right.lua new file mode 100644 index 0000000..026c32e --- /dev/null +++ b/res/scripts/map1_off_right.lua
@@ -0,0 +1,9 @@
1function map1_off_right()
2 -- Because this script gets triggered within the CharacterSystem's tick method,
3 -- if we immediately cleared out the entities from the old map, we might end up
4 -- returning there and processing stale data. This yield here ensures that we
5 -- are no longer in the CharacterSystem, because processing gets picked back up
6 -- in the ScriptSystem.
7 coroutine.yield()
8 loadMap("../res/maps/map2.tmx", "fromLeft")
9end