Code to make sprites clickable like menu choice?or Imagemap?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
Kate
Regular
Posts: 197
Joined: Thu Sep 19, 2013 6:10 pm
Projects: Blackout
Organization: Moonlight Otome
Location: United States
Contact:

Code to make sprites clickable like menu choice?or Imagemap?

#1 Post by Kate » Tue Nov 10, 2015 9:01 pm

To clarify, if I throw the sprites up themselves on screen, can I add code to make them clickable? For example, the question would be "Who do you want to help? (Is it feasible to squeeze 8 characters on the screen to do this?)

Or would you recommend making a screen with the sprites arranged on the same image layer as the background and use image mapping?
Current Project:
Blackout [VN][Romance][GxB][Mystery][Suspense] http://lemmasoft.renai.us/forums/viewto ... 43&t=34118
"It is the duty of authors to make the fantastic seem ordinary and the ordinary seem fantastic." - K. Auer

philat
Eileen-Class Veteran
Posts: 1853
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Code to make sprites clickable like menu choice?or Image

#2 Post by philat » Tue Nov 10, 2015 9:32 pm

You can show the sprites as imagebuttons in a screen.

User avatar
firecat
Miko-Class Veteran
Posts: 540
Joined: Sat Oct 25, 2014 6:20 pm
Completed: The Unknowns Saga series
Projects: The Unknown Saga series
Tumblr: bigattck
Deviantart: bigattck
Skype: bigattck firecat
Soundcloud: bigattck-firecat
Contact:

Re: Code to make sprites clickable like menu choice?or Image

#3 Post by firecat » Tue Nov 10, 2015 9:59 pm

fear not, there's a program to help with this:
http://lemmasoft.renai.us/forums/viewto ... 52&t=31723
Image


Image


special thanks to nantoka.main.jp and iichan_lolbot

User avatar
Kate
Regular
Posts: 197
Joined: Thu Sep 19, 2013 6:10 pm
Projects: Blackout
Organization: Moonlight Otome
Location: United States
Contact:

Re: Code to make sprites clickable like menu choice?or Image

#4 Post by Kate » Tue Nov 10, 2015 10:14 pm

Many thanks, I'm going to check that out!

One more question- is there an easy way to set specific on-screen location for sprites since I'll be cramming 8 of them onscreen? I know show left and show right won't be sufficient for this...
Current Project:
Blackout [VN][Romance][GxB][Mystery][Suspense] http://lemmasoft.renai.us/forums/viewto ... 43&t=34118
"It is the duty of authors to make the fantastic seem ordinary and the ordinary seem fantastic." - K. Auer

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Code to make sprites clickable like menu choice?or Image

#5 Post by namastaii » Wed Nov 11, 2015 2:44 am

imagebutton xalign=0.0,yalign=0.0:



Put the numbers you need

Then proceed with putting the rest of the imagebutton information

and for just showing the sprites (that aren't buttons) I think is something like this, but I could be wrong:

show sprite onlayer master:
xalign 0.5 yalign 0.5

Post Reply

Who is online

Users browsing this forum: Google [Bot]