I am considering trying to combine two short visual novels into one game with title headings: Chapter 1, Chapter 2.
The idea is that Chapter 1 leads you to a game that is 800 x 600 resolution, and that Chapter 2 leads you to a game that is 768 x 1366.
I tried an if statement but the game didn't like that. Is this at all plausible or should I stop trying?
Changing game width/height with in game button?
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.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Changing game width/height with in game button?
I'll be honest, it would be kind of hard - Ren'Py isn't designed for this.
Probably the way to do this would be to have something like (requires 6.99.7):
Another option might be to use some clever styles for the text box, and a layer transform to rescale the master layer.
Probably the way to do this would be to have something like (requires 6.99.7):
Code: Select all
define persistent.part = 1
init python:
if persistent.part == 1:
config.screen_width = 800
config.screen_height = 600
else:
config.screen_width = 768
config.screen_height = 1366
class ChangePart(Action):
def __init__(self, part):
self.part = part
def __call__(self):
persistent.part = self.part
renpy.utter_restart()
label start:
if persistent.part == 1:
jump part1
else:
jump part2
[code]
And then add something like:
[code]
textbutton "Part 1" action ChangePart(1)
textbutton "Part 2" action ChangePart(2)
Another option might be to use some clever styles for the text box, and a layer transform to rescale the master layer.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Bing [Bot]
