The
()
is missing for all screen declarations.
As said by
You must be registered to see the links
, their absence "requires Ren'Py to be more conservative when analyzing the screen, which can limit the optimization it performs".
Why a screen by button ?
It clearly over complicate the code since you've to show/hide many screens every time, and also can't call them.
Why
xanchor
/
yanchor
in addition with
xpos
/
ypos
?
The anchor are just adjusting the position you gave. You're positioning the button, then telling Ren'Py to change this position by half its width and half its height. Just position the button directly.
Anchors are for very specific cases. Mostly when you're dealing with multi elements displayable (
fixed
,
label
or
textbutton
) and have to modify the position of the embedded one.
Why
action Show "statusd.png"
?
You must be registered to see the links
documentation is relatively explicit, "this causes another
screen to be shown". And obviously, it don't works because... well, where are the parenthesis ?
There's not much right in the few lines of code you shown.
I want to make it so that when you press one of these buttons it shows an image, but it does NOT jump from the label, because otherwise I think it could be complicated.
One of the many way to do this:
Python:
screen whatever():
default shown = None
if not shown is None:
add shown xalign 0.5 yalign 0.5
imagebutton:
[positioning]
auto "whatever%s.png"
action SetScreenVariable( "shown", "whatever image.jpg" )
imagebutton:
[positioning]
auto "whatever1%s.png"
action SetScreenVariable( "shown", "whatever1 image.jpg" )
How would it be possible to display an image when clicking on the button and when the player clicked on the screen or another button that I later added, it returned to the same position it was in before (I mean the text to the screen, etc) as if time had not advanced
It's what
You must be registered to see the links
is for.
Python:
screen whatever():
[...]
textbutton "Close" action Return()
label whatever:
call screen whatever