Hi, everyone!
In my Dating Sim, the player moves around the city by clicking on an imagemap. I want to place an icon next to each location of this imagemap that indicates the presence or absence of an event, so the player would not waste time visiting empty places.
What would be the best way to deal with this? My idea is to show the icon image over the imagemap (I do not know if it is possible) every time the conditions for the events are confirmed. But I believe there are smarter solutions to get the same result.
EDIT:
I decided to make it as easy as possible, but it did not look elegant. On the imagemap screen, I wrote several condition tests to check if the events are available or not. If available, I used the "add" command to place an icon next to each location the player can visit.
It worked, but it seemed to me a bad solution to the problem. If anyone has better suggestions, I appreciate it.
Displaying images above an imagemap?
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.
- Empish
- Veteran
- Posts: 221
- Joined: Thu Jan 14, 2016 9:52 pm
- Projects: Efemural Hearts, It Ends With Graduation
- itch: empish
- Contact:
Re: Displaying images above an imagemap?
What I like to do when things are conditional like that is to be able to pass in a function pointer that will return either True (ie yes there is an event here because all conditions are met) or False (no event here). That way you can get that condition testing out of the screen and into separate places where it can also be more flexible.
Then in the screen, you can just place the icon(s) based on whether the function evaluates to True or not.
Then in the screen, you can just place the icon(s) based on whether the function evaluates to True or not.
Who is online
Users browsing this forum: Google [Bot]