So, the idea is that the character (in this specific case, a young lady named Melanie) is sitting in front of the player, and you can click the curtain next to her to open and close it. Ergo, when you click on the curtain area, this is what I want to happen.
I've already read this tutorial to try to map out a button, but what I don't get is where to put this code or if I'm even approaching it correctly. Do I make it a custom screen in it's own .rpy file? Or do I try to define a new imagemap within the script itself as I go whenever I want a scene like this to happen?
My code for this section in script.rpy currently looks like this:
Code: Select all
##CLICKABLECARRIAGE START##
scene movingcarriagebg:
carriagesway
show closedcurtains
show carriageclickablemelanie smiletalk
with fade
mel "I'm so happy we get to live here now!"
show carriageclickablemelanie smile
tips "Sometimes there are clickables within special environments like this."
tips "You can click on objects in the background and even whomever you're talking to for special interactions!"
tips "Try clicking on the curtain."
imagemap:
idle "curtain1_idle.png"
hover "curtain1_hover.png"
ground "curtain1_ground.png"
hotspot (156, 20, 252, 680) action Show('movingcurtains')
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 270: expected statement.
imagemap:
^
Ren'Py Version: Ren'Py 7.4.0.892
Wed Sep 21 20:00:55 2022