[answered] python equivalent to define a transform?

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
User avatar
SONTSE
Regular
Posts: 95
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 8 VN's so far
Contact:

[answered] python equivalent to define a transform?

#1 Post by SONTSE » Fri Oct 03, 2014 8:04 am

so i need a transform to be placed within "atlist" in renpy.show. can i declare it within a python block?
something with linear/ease movement and parallel would be nice too. Thanks ^^
Last edited by SONTSE on Fri Oct 03, 2014 5:59 pm, edited 1 time in total.
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: what is a python equivalent to declare a transform?

#2 Post by PyTom » Fri Oct 03, 2014 5:10 pm

Lena_Borodach wrote:so i need a transform to be placed within "atlist" in renpy.show. can i declare it within a python block?
something with linear/ease movement and parallel would be nice too. Thanks ^^
There are a couple of answers to this. The first is to point out that ATL transforms can take parameters, so you could always used a parameterized ATL transform.

Code: Select all

transform moveto(new_align=0.5, delay=1.0):
    linear delay xalign 0.5

$ renpy.show("eileen happy", at_list=[ moveto(0.75, 2.0) ])
Beyond that, you can use a Transform with a function argument. There isn't a way to define an ATL transform at runtime - doing so would be far harder than just using a Python function inside your transform.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
SONTSE
Regular
Posts: 95
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 8 VN's so far
Contact:

Re: [answered] python equivalent to define a transform?

#3 Post by SONTSE » Fri Oct 03, 2014 6:02 pm

I think i got the picture now. Thank you PyTom! =)
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)

Post Reply

Who is online

Users browsing this forum: Google [Bot]