Keeping current scene when using jump command [Solved]
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.
Keeping current scene when using jump command [Solved]
Hi, sorry but I got another question. Is there a way to keep the current background when jumping to another part of the program by jumping to another label. Take a look at the attachments to see what I mean. I want to call up a menu screen while retaining the current scene as the background. But ren'py will always delete the current image when it moves on to the next lable via the jump command.
- Attachments
Last edited by Strum on Sat Oct 03, 2009 10:02 am, edited 1 time in total.
-
- Regular
- Posts: 156
- Joined: Tue Jun 02, 2009 8:56 pm
- Projects: Jewels of Sytinane
- Location: U.s.a.
- Contact:
Re: Keeping current scene when using jump command
sounds like you might wanna use the callsinnewcontext inside of jump. that'll bring the menu up over the current gameplay.
http://renpy.org/wiki/renpy/doc/referen ... newcontext
edit: also make sure that the images are transparent else they will show up the same as in your current result!!
http://renpy.org/wiki/renpy/doc/referen ... newcontext
edit: also make sure that the images are transparent else they will show up the same as in your current result!!
--- My DeviantArt.
Game in Progress for demo-teaser:
story(script) = 45%
sprites = 100%
programming(interface) = 35%
CGs = 0%
Backgrounds = 5%
Music/sound = 0%
Game in Progress for demo-teaser:
story(script) = 45%
sprites = 100%
programming(interface) = 35%
CGs = 0%
Backgrounds = 5%
Music/sound = 0%
Re: Keeping current scene when using jump command
Thank you very much, that's just the function I've been looking for. Another lesson learned, well time for me to plod on with the game.
-
- Eileen-Class Veteran
- Posts: 1686
- Joined: Mon Sep 21, 2009 8:03 pm
- Projects: E-mail me if you wanna rock the planet
- Location: USA
- Contact:
Re: Keeping current scene when using jump command
I've been trying all morning to make a frame like you've already got enabled on your bottom screenshot ... (’-’*) Did you use imagemaps or place the buttons differently?
Is there a premade frame with buttons on the Wiki already? I don't need graphics (I can make those), just a general idea of the code.
Is there a premade frame with buttons on the Wiki already? I don't need graphics (I can make those), just a general idea of the code.
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com
https://cherylitou.wordpress.com
Re: Keeping current scene when using jump command
I just used a code posted by PyTom to make those in game buttons
You just need to change the textbuttons to imagebuttons.
Code: Select all
# This file adds a number of buttons to the lower-right hand corner of
# the screen. Three of these buttons jump to the game menu, which
# giving quick access to Load, Save, and Prefs. The fourth button
# toggles skipping, to make that more convenient.
init:
# Give us some space on the right side of the screen.
$ style.window.right_margin = 100
python:
def toggle_skipping():
config.skipping = not config.skipping
def button_game_menu():
# to save typing
ccinc = renpy.curried_call_in_new_context
ui.vbox(xpos=0.98, ypos=0.98, xanchor='right', yanchor='bottom')
ui.textbutton("Skip", clicked=toggle_skipping)
ui.textbutton("Save", clicked=ccinc("_game_menu_save"))
ui.textbutton("Load", clicked=ccinc("_game_menu_load"))
ui.textbutton("Prefs", clicked=ccinc("_game_menu_preferences"))
ui.close()
config.overlay_functions.append(button_game_menu)
-
- Regular
- Posts: 155
- Joined: Sun Mar 01, 2009 2:31 pm
- Projects: Summer Tales of Katt and June
- Contact:
Re: Keeping current scene when using jump command
Gotta remember this thread. Easier if I post for future reference. Thanks!
-
- Eileen-Class Veteran
- Posts: 1686
- Joined: Mon Sep 21, 2009 8:03 pm
- Projects: E-mail me if you wanna rock the planet
- Location: USA
- Contact:
Re: Keeping current scene when using jump command [Solved]
I'll just use this thread instead of making a new one: what's the appropriate method of turning into an imagebutton within the game menu on the textbox?
I found this: http://www.renpy.org/wiki/renpy/doc/ref ... magebutton but I'm not sure how to embed that with the ui.interact function too ...
Code: Select all
ui.textbutton("Skip", clicked=toggle_skipping)
I found this: http://www.renpy.org/wiki/renpy/doc/ref ... magebutton but I'm not sure how to embed that with the ui.interact function too ...
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com
https://cherylitou.wordpress.com
Re: Keeping current scene when using jump command [Solved]
Don't know if you still need this since you posted 2 days ago, but try...JinzouTamashii wrote:I'll just use this thread instead of making a new one: what's the appropriate method of turninginto an imagebutton within the game menu on the textbox?Code: Select all
ui.textbutton("Skip", clicked=toggle_skipping)
I found this: http://www.renpy.org/wiki/renpy/doc/ref ... magebutton but I'm not sure how to embed that with the ui.interact function too ...
Code: Select all
ui.imagebutton("skipA.png", "skip.png", clicked=toggle_skipping)
-
- Eileen-Class Veteran
- Posts: 1686
- Joined: Mon Sep 21, 2009 8:03 pm
- Projects: E-mail me if you wanna rock the planet
- Location: USA
- Contact:
Re: Keeping current scene when using jump command [Solved]
Yeah, I actually bookmarked this thread... thanks, I'll try that out when I make a skipbutton.png.
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com
https://cherylitou.wordpress.com
Who is online
Users browsing this forum: Ahrefs [Bot]