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.
I want to have something happen to an image every time I call it, and I know that in Python you can define procedures like that, but can you do it with Ren'Py? It would save a lot of space. I don't mind copy/pasting the functions, I just want to know if there's a better way to do it? A less cluttered way?
transform spell_animation:
xalign .5 #This puts the image at truecenter
yalign .5
zoom 2.0
linear 1.0 zoom 1.0
linear 1.0 zoom 2.0
repeat 5.0
This is not actually a procedure (also called function), it's a block of ATL (Animation and Transformation Language) used by Ren'Py, but once it is coded you can use it as many times as you like just like you would a function.
transform spell_animation:
xalign .5 #This puts the image at truecenter
yalign .5
zoom 2.0
linear 1.0 zoom 1.0
linear 1.0 zoom 2.0
repeat 5.0
This is not actually a procedure (also called function), it's a block of ATL (Animation and Transformation Language) used by Ren'Py, but once it is coded you can use it as many times as you like just like you would a function.