summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-09 22:28:27 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-09 22:28:27 -0500
commit5931470800c43260f600303d1231dbaf586f26fc (patch)
treeaaaa30ee6bae81c1badc8b70d2fbdce33a058d5a /res/scripts
parent315ca2fb388f790791c9ce372cf44e00d51e0e7f (diff)
downloadtanetane-5931470800c43260f600303d1231dbaf586f26fc.tar.gz
tanetane-5931470800c43260f600303d1231dbaf586f26fc.tar.bz2
tanetane-5931470800c43260f600303d1231dbaf586f26fc.zip
Map changing!
Also removed some dependencies on the Renderer. More changes need to be made. Fading to black before the change would be good. And making sure the characters are facing the right direction. Maybe that code shouldn't live in Game, either. Later we also want to combine the tilesets for these two maps (and any others that are on Tanetane).
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