Custom transform not working [SOLVED]

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
beastcarving
Regular
Posts: 122
Joined: Mon May 13, 2019 5:03 pm
Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
Projects: Your Brother's Religion
Organization: BeastCarving Studio
IRC Nick: BeastCarving
Tumblr: beastcarving
Deviantart: beastcarving
Github: beastcarving
itch: beastcarving
Contact:

Custom transform not working [SOLVED]

#1 Post by beastcarving » Mon May 25, 2020 4:15 am

Code: Select all

        transform jump:
            xpos 600 ypos 1280
            parallel:
                ypos 1300
                linear 1.6 ypos 810
                linear 1.4 ypos 1300
                linear 1.2 ypos 890
                linear 2.9 ypos 1280
                linear 2.7 ypos 890
                repeat
When I try showing this:

Code: Select all

show bunny at jump, center
the image does move at all. Is there something I've done wrong?
Last edited by beastcarving on Thu May 28, 2020 2:58 am, edited 1 time in total.
Image Pulse Cage (full game)Image Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3000
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Custom transform not working [Help]

#2 Post by Imperf3kt » Mon May 25, 2020 4:36 am

Your indentation looks odd, transforms should be outside any label and all the way to the left.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

User avatar
Remix
Eileen-Class Veteran
Posts: 1455
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Custom transform not working [Help]

#3 Post by Remix » Mon May 25, 2020 5:33 am

center is a positional transform... it adjusts pos (as a byproduct of adjusting align) so overrides other positional settings

So, bunny at jump, center is saying put bunny at xpos 600 ypos 1280 and move to ypos 890 AND finally (before drawing the frame) put bunny at center (likely xpos 640)
Frameworks & Scriptlets:

drKlauz
Regular
Posts: 196
Joined: Mon Oct 12, 2015 3:04 pm
Contact:

Re: Custom transform not working [Help]

#4 Post by drKlauz » Mon May 25, 2020 5:54 am

Try yoffset instead of ypos in your transform.
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350

User avatar
beastcarving
Regular
Posts: 122
Joined: Mon May 13, 2019 5:03 pm
Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
Projects: Your Brother's Religion
Organization: BeastCarving Studio
IRC Nick: BeastCarving
Tumblr: beastcarving
Deviantart: beastcarving
Github: beastcarving
itch: beastcarving
Contact:

Re: Custom transform not working [Help]

#5 Post by beastcarving » Mon May 25, 2020 3:04 pm

It worked. Thanks for helping everyone.
Image Pulse Cage (full game)Image Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving

Post Reply

Who is online

Users browsing this forum: Google [Bot]