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.
This doesn't replace any and all ATL transform with an "on hide" clause (although you can easily convert your ATL transforms to ATL transitions), but you can use [With(moveoutright), Return()].
moveoutright isn't exactly the same as the transform you're using, but as I said you can convert yours to a valid transform using this https://www.renpy.org/dev-doc/html/atl. ... ransitions
_ticlock_ wrote: ↑Thu Jun 16, 2022 4:22 pm
I wonder if there is a way to perform it without a timer? Or just a better way to perform different transforms depending on the variable value.
I'm not sure I understand what you're looking for. Does this help?
Since calling a screen is an interaction, and interactions trigger an implicit with None, using a with statement after the call screen instruction won't make the screen disappear using the transition, as the screen will already will be gone. To disable the implicit with None transition, pass the _with_none=False special keyword argument to the screen, as in the example below.
Other ways of triggering transitions also work, such as the [ With(dissolve), Return() ] action list.
Gouvernathor wrote: ↑Thu Jun 16, 2022 10:31 pm
you can use [With(moveoutright), Return()].
Transition is applied to the whole screen, I believe. I like it, but the intention was to apply animation "on hide" only for one child of the screen.
zmook wrote: ↑Thu Jun 16, 2022 10:40 pm
Does this help?
I don't think it will help in the way I'm trying to do it, but maybe it will help if I try to do it in a different way. Thanks for pointing that out.
The timer actually works pretty good for me, it just looks weird. Also, I am trying to figure out if it may cause some unexpected errors, that would be hard to track. What do you think?
I liked that I have everything in one screen, I guess that is the reason of this problem.
_ticlock_ wrote: ↑Thu Jun 16, 2022 11:25 pm
Transition is applied to the whole screen, I believe. I like it, but the intention was to apply animation "on hide" only for one child of the screen.
Aha. Well, remember that transforms are just functions, and you can assign functions to variables and return them from methods. When screens get complicated, it can be useful to offload logic into a python controller class -- that is, to start implementing the Model-View-Controller pattern.
I've never messed with "on hide" triggers, so I don't know offhand if there's a better way than your timer to make sure that they do get shown, but you can certainly do all the logic you want on *what* transform to show:
zmook wrote: ↑Fri Jun 17, 2022 7:03 am
Aha. Well, remember that transforms are just functions, and you can assign functions to variables and return them from methods. When screens get complicated, it can be useful to offload logic into a python controller class -- that is, to start implementing the Model-View-Controller pattern.
Great. It can be very useful! Even for some other things I wanted to do.