Pixellate in 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
Westeford
Regular
Posts: 151
Joined: Mon Jun 19, 2017 4:43 pm
Completed: 12 Hours to Die
Projects: Project Premonition
itch: westeford
Location: United States
Contact:

Pixellate in Transform?

#1 Post by Westeford »

I might be missing something obvious, but I was wondering if it's possible to use pixellate in a transform. I'd use this for whenever I call a specific screen. I know I can use it as a transition like:
but I want to use it in a transform so I can have it pixellate on show and hide. And so I don't have to find every instance of this screen being called.

Thanks

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
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: Pixellate in Transform?

#2 Post by Remix »

You can use 'with' in transforms, just you have to tell it the displayable to transition to (and maybe back to)

Code: Select all

transform pixellate_to_new( new=Null(), old=Null() ):
    on show:
        new with pixellate
    on hide:
        old with pixellate

##  show "old" at pixellate_to_new("images/new.png", "old")
There are likely ways to do it just with transitions set against the screen though, which might be better
Frameworks & Scriptlets:

User avatar
Westeford
Regular
Posts: 151
Joined: Mon Jun 19, 2017 4:43 pm
Completed: 12 Hours to Die
Projects: Project Premonition
itch: westeford
Location: United States
Contact:

Re: Pixellate in Transform?

#3 Post by Westeford »

Remix wrote: Fri Jan 24, 2020 7:54 am You can use 'with' in transforms, just you have to tell it the displayable to transition to (and maybe back to)

Code: Select all

transform pixellate_to_new( new=Null(), old=Null() ):
    on show:
        new with pixellate
    on hide:
        old with pixellate

##  show "old" at pixellate_to_new("images/new.png", "old")
There are likely ways to do it just with transitions set against the screen though, which might be better
So are "new" and "old" separate images?

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]