Zoom function for non-background elements?

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
derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

Zoom function for non-background elements?

#1 Post by derik »

Howdy!

Recently, I wanted to have a displayable character image move across the screen while changing size.

"No problem!" says I, "while FactorZoom is the suggested method for dealing with character images, the plain zoom function explicitly supports non-opaque elements, I bet it can do it!"

It took a bit of noodling, and adjusting my preconceptions- ("Ohh... I see! the first tuple is really just 'the side of the area into which the crops of the second and third are scaled in time")

(I'm aware this is a back-assward way t accomplish the desired effect, but I only have to do it ONCE, and... I don't think any other current renpy function does it.)

'cept it's being obstinate. When opaque=True, it scales and animates politely as can be. But when opaque=False, the zoom... does not move, as if both the second and third tuples were identical. (or, probably more accurately, as if it were failing to tween from second to third.)

This is my current test code, using a 400x155 image.

Code: Select all

show sam1 at Zoom ((400,400),(0,0,400,155),(0,0,200,100),8.0,opaque=False)
I suspect the answer to this question is- "you tried to do somethign the engine doesn't want to do," but I'm just checking to be sure.

As for me? I'm going back to a simple Move- the scaling effect was a semi-subtle one, I can live without it.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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:

#2 Post by PyTom »

You've found a bug in Ren'Py, which will be fixed in 5.6.5. Sorry about that, and thanks for reporting this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

#3 Post by derik »

PyTom wrote:You've found a bug in Ren'Py, which will be fixed in 5.6.5. Sorry about that, and thanks for reporting this.
No biggie from my perspective. Glad to help.

(I always like specific explanations what's not working when someone else has a technical problem for me, so I try to apply the same principle to others.)

Post Reply

Who is online

Users browsing this forum: Google [Bot]