Scale an Image while slowly fading to transparency [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
mugenjohncel
Hentai Poofter
Posts: 2121
Joined: Sat Feb 04, 2006 11:13 pm
Organization: Studio Mugenjohncel
Location: Philippines
Contact:

Scale an Image while slowly fading to transparency [SOLVED]

#1 Post by mugenjohncel »

I've been stuck with this problem for hours and I have reached a point where I raise the white flag and scream SOS... I'll go straight to the problem... for context, the project screen size is 1280px x 720px

Long story short, I have a small white image whose size is 200px x 100px and we shall call this image "white square" for clarity. The behavior I am trying to achieve is make "white square's" anchor center and show it at position x=350, y=645 while scaling it's size from 100% to 200% and transparency from 0 (total opaque) to 100 (total transparent) within 3 seconds...

I know how to do some of the more basic stuff but trying to tie several behaviors together always end up getting it wrong somehow so uh... help anyone?...

Thanks in advance...
Last edited by mugenjohncel on Thu Jul 20, 2017 4:24 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Scale an Image while slowly fading to transparency

#2 Post by PyTom »

How does this look ?

Code: Select all

transform sensible_name_here:
     xanchor 0.5 yanchor 0.5 xpos 350 ypos 645 zoom 1.0 alpha 0.0
     linear 3.0 zoom 2.0 alpha 1.0

#...

show white square at sensible_name_here


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

User avatar
mugenjohncel
Hentai Poofter
Posts: 2121
Joined: Sat Feb 04, 2006 11:13 pm
Organization: Studio Mugenjohncel
Location: Philippines
Contact:

Re: Scale an Image while slowly fading to transparency

#3 Post by mugenjohncel »

Ah! Thank you!... It works now...

Edit:
I placed coma's in places where there shouldn't be any... so this sample is really helpful in identifying where I messed up...

"POOF" (Back to scripting)

Post Reply

Who is online

Users browsing this forum: elcharlo, Google [Bot]