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 to anyone reading I've looked up this topic quite a bit before and seen some examples although I'm not really completely satisfied with what I've seen. I've learnt to come to come to grips with the xpos and all those small details but what I want to know is:
1. Can I define custom positions once and apply them to all the sprites?
If for example say these are the positions I want to apply for left and right globally meaning for any sprite I use in the game (these are not really the positions )
$ left = Position(xpos= 0.35, xanchor='left')
$ right = Position(xpos= 0.70, xanchor='right')
then how do I go about this?
And can I also see examples of scripts with these types of properties applied? The examples I've seen only show the bits of code to put into the script and I understand those but what I need to see is where to put these bits of code and how it looks overall. This would help loads *smoke screen: ninja stealth level 10*
You can put this code wherever in a .rpy file, Ren'Py understands the "transform" as an "init" thing to do, even if you don't put the "init" word.
The "transform" accepts all the ATL language, you can use them to make animations too.
Later, in the game, you use the "at" statement, as Tsapas has showed:
You can put this code wherever in a .rpy file, Ren'Py understands the "transform" as an "init" thing to do, even if you don't put the "init" word.
The "transform" accepts all the ATL language, you can use them to make animations too.
Later, in the game, you use the "at" statement, as Tsapas has showed:
Thank you for your suggestion, but this did not make a difference.
The image is still not being displayed, unless I use the predefined "at left" location.
Really strange, since it worked fine the day before.
Google search: "renpy thisismyquestion -org"
This gives you everything - except renpy.org results. Which I find useless 90% of the time.
at left is working because "left" is a pre-defined transform, so it is working. You are getting problems with your code because you are using super old code.
transform my_left:
xalign 0.1
yalign 1.0
label start:
show character1 at my_left
"This should work."
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?)
Thanks, I had already tried that as well.
There is something else going on. I just changed all instances from "my_left" to "more_centered" - - and it started
working again.. Go figure.
I think it has to do with how RenPy remembers the show at position, so you don't have to constantly specify "at left" every time.
At least that is my understanding.
I'll just pad my side images to move them more towards the center.
Thanks for your input everyone!
Google search: "renpy thisismyquestion -org"
This gives you everything - except renpy.org results. Which I find useless 90% of the time.