Hi!
I'm starting with Ren'Py and getting into a bit. I've got a basic world set up with a map and rooms (placeholder image since I'm not an artist) and am now going through to start working on dialogue.
At the start of my game, I show characters chatting back and forth.
To handle the rooms, I show screens that contain the background, imagebuttons and imagemaps. And then I start a ui.interact loop to wait for the user to do something. I'm not sure if this is the proper way these days but I found the code for it and it's working.
However, after loading one of the rooms. "show <character>" no longer seems to work. So "show mary happy at right" does nothing, for example. The same command works fine before I start doing anything with screens (in the intro) but after that, it fails.
Help, please!
Show Character doesn't work in screens?
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.
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Show Character doesn't work in screens?
You can not use the "show displayable" statement inside a screen, but you can use "add".
https://www.renpy.org/doc/html/screens.html#add
https://www.renpy.org/doc/html/screens.html#add
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Re: Show Character doesn't work in screens?
Is it not normal to use screens for rooms and such during a game? I thought that's how it was done due to the imagemap and imagebutton usage?
Also, is there a way to remove an image manually once added via "Add"?
Also, is there a way to remove an image manually once added via "Add"?
Re: Show Character doesn't work in screens?
The way I do it is to use the scene command for the background, and then show screen for the UI, and show for the character.
You can then use shows and hides to your heart's content.
Code: Select all
scene livingroom # Needs an image defined, or an image file called livingroom.
show screen calendar # Or whatever screen name you're using
show character
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Show Character doesn't work in screens?
You could do this a few ways, but I think the best approach is to use a variable to set whether the image shows, and change it within your script.
Then in the screen, the image shows orhides depending on the variable.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: Show Character doesn't work in screens?
Is it better to use screens/Add to show characters or better to use envixer's recommendation to get the actual official "show" function working? I'm still at a point where I can make changes to the code and placeholders I'm using but I really don't want to get too far and have to overhaul everything.
I'd just like to try and nail down the recommended method.
Also, if I go envixer's route, how do I get characters (shown with the "show" command) to appear in front of imagebuttons?
I'd just like to try and nail down the recommended method.
Also, if I go envixer's route, how do I get characters (shown with the "show" command) to appear in front of imagebuttons?
Re: Show Character doesn't work in screens?
You might want to have a look at how layers work: https://www.renpy.org/doc/html/displaying_images.html
Usually, I just make sure my UI elements don't block the area where my characters will appear, but that's just me looking for an easy life. In the rare occasion where I need a character to appear above the buttons, I use a custom layer between screens and overlay (More info in the link above).
Usually, I just make sure my UI elements don't block the area where my characters will appear, but that's just me looking for an easy life. In the rare occasion where I need a character to appear above the buttons, I use a custom layer between screens and overlay (More info in the link above).
Who is online
Users browsing this forum: Majestic-12 [Bot], Ocelot