I'm making a really basic portfolio kind of thing with Ren'Py, but I keep bumping into trouble with imagemaps (which is a big problem since I want to handle the entire portfolio as several imagemaps.)
So I have these two image files, "selected.png" and "ground.png" and the following code (taken straight from the wiki more or less:)
Code: Select all
k "What section would you like to view?"
$ result = renpy.imagemap("ground.png", "selected.png", [
(100, 100, 300, 400, "writing"),
(500, 100, 700, 400, "drawing")
])
if result == "writing":
"Writing" "Writing it is!"
elif result == "drawing":
"Drawing" "This is the drawing section."
then after that, if you highlight the right it'll display drawing selected, or if the left then writing.
Should I have made two separate images (one for drawing, one for writing)? Is the one just fine? How do I get the code to work since I keep getting the following error,
Any and all help/assistance would be greatly appreciated!On line 35 of C:\Documents and Settings\Kevin\My Documents\renpy-6.11.0\Kevin Campbell Portfolio/game/script.rpy: if statement expects a non-empty block.
if result == "writing":
^
On line 38 of C:\Documents and Settings\Kevin\My Documents\renpy-6.11.0\Kevin Campbell Portfolio/game/script.rpy: expected statement.
elif result == "drawing":