Hi all. Starting from the ground up here, not even standing, face is pretty much flat on the ground and i'm breathing in dirt. I was wondering If you all can help me understand screens. I always check out the documentation first before I ask stuff, but I'm not experienced enough with coding to bridge the gap between "These are the more complex things that Ren'Py can do", and "This is exactly what you need to type in your script".
Right now I just want to make a simple screen that makes a button pop up on the screen. I click it and it goes back to whatever I'm doing.
Anyway, from what I read about screens, I got that you create them by typing something like
"My_Screen():"
---------------------------------------------------------------------------------------
by the underscore im assuming that there can be no spaces in a screen name.
parenthesis are used to contain arguments?
but you need parenthesis even without arguments?
Lastly the screen name has to end with a colon?
------------------------------------------------------
as far as I know this just tells the script that the screen exists? and to call it you need to type
"call My_Screen"
in the script.rpy?
My first attempt at starting this screen was this. I put this in some random place in my screen.rpy
Code: Select all
screen click_me():
imagebutton auto "gui/click me_%s.png"
align .5, .5
action Return()
--------------------------------------------------------------------------------------------------------------------------------------------------
I know that in other languages indentation is good for clarity and organization, but here indentations are needed for code to work?
--------------------------------------------------------------------------------------------------------------------------------------------------
I called this test screen using a call statement in my script.rpy
Code: Select all
label start:
scene bg room
show eileen happy
## These display lines of dialogue.
"Hello, world."
call screen click_me