renpy.show and yalign

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.
Post Reply
Message
Author
jewxcelia
Newbie
Posts: 3
Joined: Mon Sep 17, 2018 9:42 am
Contact:

renpy.show and yalign

#1 Post by jewxcelia »

I just don't understand why this doesn't work
$ renpy.show(hero):
yalign 0.5
File "game/script.rpy", line 396: Line is indented, but the preceding one-line python statement statement does not expect a block. Please check this line's indentation.
yalign 0.5
^
I need an image to be on the center. Maybe there is another solution?

DannX
Regular
Posts: 99
Joined: Mon Mar 12, 2018 11:15 am
Contact:

Re: renpy.show and yalign

#2 Post by DannX »

That won't work because renpy.show() is a function, it can't be followed by : or properties, what you need is a statement.

Where are you trying to do this? If it's in the script, for example, you use show statement:

Code: Select all

show hero:
    yalign .5
Or, if it's in a screen:

Code: Select all

add hero:
    yalign .5

jewxcelia
Newbie
Posts: 3
Joined: Mon Sep 17, 2018 9:42 am
Contact:

Re: renpy.show and yalign

#3 Post by jewxcelia »

I use $renpy.show because hero is a variable. One could choose a character and I didn't find a better way to show a character because show doesn't seem to work with variables. But I think I can solve this with if statement.
Thank you for reply


Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Majestic-12 [Bot]