The dungeon crawler will play normally without any events and random battles also work, but I need to add an exit to the dungeon in addition to several event battles.
Code: Select all
python:
#other code here... skip to the dungeon section
# Create a dungeon stage (map,enemy)
# "1" means wall, "0" means path.
stage1=Stage([
"1111111111",
"1111011001",
"1000000001",
"1110111101",
"100a000001",
"1111111111",
],
enemy=ghost)
#outside of the dungeon section
$ here=Coordinate(stage1,2,2,0,1)
if [here.y][here.x]=="a":
jump exit
Traceback error:
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 129, in script
if [here.y][here.x]=="a":
File "game/script.rpy", line 129, in <module>
if [here.y][here.x]=="a":
IndexError: list index out of range
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 129, in script
if [here.y][here.x]=="a":
File "E:\Renpy\renpy-6.99.12.4-sdk\renpy\ast.py", line 1656, in execute
if renpy.python.py_eval(condition):
File "E:\Renpy\renpy-6.99.12.4-sdk\renpy\python.py", line 1749, in py_eval
return py_eval_bytecode(code, globals, locals)
File "E:\Renpy\renpy-6.99.12.4-sdk\renpy\python.py", line 1743, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/script.rpy", line 129, in <module>
if [here.y][here.x]=="a":
IndexError: list index out of range
I am also can't find the code for where it tells Renpy how to render the walls using the 1s and 0s. I think I will have to find this eventually as I will probably need to add a few special wall types (stairs, doors, event and story related walls... though I guess I might need to try and keep this as simple as possible if each wall needs to be rendered at several different angles).
Thanks for your time!