At the moment I have a map of a village with several buildings showing as hotspots on an imagemap. Fairly straightforward.
I would like to have building become hoverable when certain story stages are met. As a novice at programming, I believe showif can only be used in screens. So should I be using imagebuttons for the buildings so as to hide them unless a variable if true? I assume this to be a common thing in games but has me confused.
Any pointers would be appreciated.
[Solved] World maps. Imagemap or screen with imagebuttons?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 19
- Joined: Thu Oct 24, 2019 11:28 am
- Contact:
[Solved] World maps. Imagemap or screen with imagebuttons?
Last edited by thomas_oak on Sat Nov 02, 2019 8:51 am, edited 1 time in total.
- XxrenxX
- Veteran
- Posts: 267
- Joined: Tue Oct 02, 2012 2:40 am
- Projects: Chasing
- Deviantart: bara-ettie
- Location: Canada
- Contact:
Re: World maps. Imagemap or screen with imagebuttons?
Something like this? If errors someone please comment, not sure if old or newer code since something I put in my project forever ago.
Code: Select all
#In Screen
imagemap:
hotspot (468,248,114,114) clicked Jump("church") #name of label
if pub_unlock:
hotspot (400,100,250,114) clicked Jump("pub")
init python:
pub_unlock = False
#In Script before line of unlock
label map:
$ pub_unlock = True
-
- Newbie
- Posts: 19
- Joined: Thu Oct 24, 2019 11:28 am
- Contact:
Re: World maps. Imagemap or screen with imagebuttons?
Thank you XxrenxX. That was very helpful. I thought it would be something obvious.
Who is online
Users browsing this forum: Google [Bot]