- Jul 4, 2017
- 2,624
- 4,828
Okay here is how to do it:
1. Add a new "screen" with code something like this. It can go in the "screens.rpy" file or we can make a custom file like "my_screens.rpy":
2. Add images matching the file names I noted in the comments (i've attached examples)
3. Use the "image location picker" tool in the Renpy Developer menu (Shift-D when game has developer mode enabled) to load up the "hover" version of the image and pick the clickable location boxes, then paste the coordinates into the hotspot commands of the Screen
4. setup the script labels and put them into the "Jump" command parameters
If you want to "gate" some of the selectable options (i.e. you can't see tunrida's afternoon nap scene until after the hotchips are finished) we'll have to do some more work with variables and the "sensitive" option on the relevant hotspots.
1. Add a new "screen" with code something like this. It can go in the "screens.rpy" file or we can make a custom file like "my_screens.rpy":
Code:
screen ch4_freeroam:
imagemap:
auto "ch4_freeroam_%s.png"
# the "auto" means renpy will look for images with the following names:
# "ch4_freeroam_ground.png" - used for the "background" which is the parts of the image that do not have hotspots
# "ch4_freeroam_idle.png" - used for the non-hovered hotspots
# "ch4_freeroam_hover.png" - used for the hovered hotspots
# each clickable area gets a hotspot.
# The action in this case is a simple "Jump" to a script label, just like in the game script
hotspot (75, 59, 335, 216) action Jump("tunrida_eat_hot_chip_and_lie")
hotspot (75, 333, 335, 216) action Jump("mc_breakdance")
hotspot (566, 228, 336, 220) action Jump("vincents_red_rocket")
3. Use the "image location picker" tool in the Renpy Developer menu (Shift-D when game has developer mode enabled) to load up the "hover" version of the image and pick the clickable location boxes, then paste the coordinates into the hotspot commands of the Screen
4. setup the script labels and put them into the "Jump" command parameters
If you want to "gate" some of the selectable options (i.e. you can't see tunrida's afternoon nap scene until after the hotchips are finished) we'll have to do some more work with variables and the "sensitive" option on the relevant hotspots.