Multiple Choice Menu
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.
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Multiple Choice Menu
Is it possible to create a menu or options imagemap screen that allows the player to choose more than one option (clicking twice results in deselecting) and then click on another button to proceed? 
-
apricotorange
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: Multiple Choice Menu
Here's a little example:
Code: Select all
screen multichoice:
default pepperoni = True
default olives = False
default pineapple = False
vbox:
yalign 0.5
textbutton "Pepperoni" xfill True action ToggleScreenVariable("pepperoni")
textbutton "Olives" xfill True action ToggleScreenVariable("olives")
textbutton "Pineapple" xfill True action ToggleScreenVariable("pineapple")
textbutton "Make pizza" xfill True action Return((pepperoni, olives, pineapple))
# The game starts here.
label start:
call screen multichoice
if _return[0]:
"Your pizza has pepperoni"
if _return[1]:
"Your pizza has olives"
if _return[2]:
"Your pizza has pineapple"
return
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Re: Multiple Choice Menu
Hmm, is it possible to create an imagemap which allows people to click and unclick stuff, with a small button at the bottom saying "confirm choices" and so on?
-
apricotorange
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: Multiple Choice Menu
Yes... it's almost identical to what I wrote. Just replace the textbuttons with hotspots, and make sure you define the selecte image correctly. See also http://www.renpy.org/doc/html/screens.html#imagemap and http://lemmasoft.renai.us/forums/viewto ... 51&t=14237 .
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Re: Multiple Choice Menu
Ah, I was just confused because there didn't seem to be a "Your pizza has pepperoni and olives" text appearance.
Who is online
Users browsing this forum: No registered users


