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.
screen shop_button:
textbutton "Shop" action *Call* ("shop_screen")
screen exitshop_button:
textbutton "Exit" action *Return to the point when you called the screen*
label start:
scene nature
show screen shop_button
"Random story begins"
"It continues.." #At this point, I want to enter the shop label by button.
"And it goes on." # I want to return here when I'm done shopping. (Or to the line above. Doesn't matter.)
"And on."
"This is the ending."
label shop_screen:
scene shop
show screen exitshop_button
cashier "Hello"
cashier "Buy something"
"Then you buy something."
"Click exit button to exit shop. It's only logical."
Don't worry about appends, costs and everything, I got that part so I'm describing it simply. You get the point.
Wow, that tester is pretty helpful for understanding screens! Did you make it just for me, or did you have it already?
ANyway, I feel so special... and lazy for not reading documentation. But it's not laziness, doc is a bit confusing, and reading it all at once makes no progress, so I rather wait untill I hit the wall, and the try to solve problem by problem.
I made the tester just for you. Whenever someone asks a question, 95% of the time I:
a) look up the documentation that is relevant to their question and read it through
b) do a search of LSF to see if the question has already been asked and answered
c) create a brand new test project and teach myself whatever code is necessary to answer the question
d) Once the test project is working, then I answer the question.
Sometimes this takes a few hours.
As for the code you posted. I think that rather than having your shop be a label called "shop_screen"--you should just make an actual screen. Give the screen your shop image as a background, have a picture of the cashier with her saying "Buy something" (or whatever you want), then have a bunch of buttons that are all the things that can be bought/sold. Have the last button on the screen be the exit.
This way you can just call the screen--or show it if you want the player to be able to buy more than one thing at a time.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)