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.
hello! new to renpy and I'm making a visual novel. right now I'm trying to get this type of effect: https://youtu.be/uU6n9Am91P4?t=18 (warning for spookiness) so I can have the player explore certain areas. specifically the clicking on an item and having it display text or setting an event into action. (not the zoom in part tho, lol)
ive been trying to use image buttons that display text in the textbox but I cant seem to figure it out! it just gives me various errors or simply does not work.
label truckstart:
call screen truckcenter
"It's your truck camper, in all its 8 am glory."
label kitchen:
scene truck kitchen
"It's a small kitchen. It smells like coffee and alcohol."
call screen truckkitchen
label booth:
scene truck booth
"It's a booth like seat with a table."
Also note that you'll never see "It's your truck camper, in all its 8 am glory" because RenPy won't move onto the next line until the player interacts with 'truckcenter', which will take them to another label. So either show the screen instead or just put the dialogue before you call the screen. You could also add a return statement to 'booth' and use call instead of jump, so that it will return to 'truckstart' when the interaction is complete.
hey tysm! its been working, but i still dont know how to go about having a button display text within the textbox when you click it? they work when i have them jump to a label or to another screen though.
label boothmap:
"Hey!"
show truck booth
call screen truckbooth
it kept showing a different image though, so i had it show the image that i needed it to and then had it go back to the original screen.
on one hand, i dont want to have to constantly make new labels, but i keep all my scripts very organized anyways LOL.
i am still having issues with having the textbox disappear when i click on something else, and i want it to stay permanent until you click on another imagebutton. i feel like using windowauto/show/hide is the way to go, but im unsure!
Just to clarify, this wouldn't work because you can't start a new interaction from within an interaction (aka the screen). Like you said you would have to jump to a new label. I know it can be a bit tedious to create a whole new label for a few lines of dialogue but it does help keep things organized.
rayminator wrote: ↑Sun May 15, 2022 11:28 pm
how they did it this way that they have two images one idle and one hover with image and text combined
Untitled-1.png
Untitled-2.png
I don't think this is what they're after.
I believe they want an image on screen they can click which first shows some dialogue in the normal say window, then upon mouse click, performs an action.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.