transform whatfx:
xalign 0.5 yalign 0.5
on show:
yoffset -100.0 alpha 0.0
linear .1 yoffset 0.0 alpha 1.0
on replace:
yoffset -100.0 alpha 0.0
linear .1 yoffset 0.0 alpha 1.0
on hide:
linear .1 yoffset 100.0 alpha 0.0
# on replaced:
# linear .1 yoffset 100.0 alpha 0.0
screen say:
text what id "what" at whatfx
use quick_menu
This doesn't work well, however, since the disappearing text is instantly replaced with the entering text. That's due to an issue with Ren'Py, and how hiding something and then showing it again will terminate the "on hide" handler. I will likely fix that at some point, but it will take a major version to do so.
Re: Is this text behaviour possible in Ren'py
Posted: Thu May 02, 2013 12:28 am
by mugenjohncel
PyTom wrote:This doesn't work well, however, since the disappearing text is instantly replaced with the entering text. That's due to an issue with Ren'Py, and how hiding something and then showing it again will terminate the "on hide" handler.
Thanks!... This will do for now... One last thing...how to position the text about 200px down instead of being at the very center?
"POOF" (Disappears)
Re: Is this text behaviour possible in Ren'py
Posted: Thu May 02, 2013 12:38 am
by pwisaguacate
..." xalign 0.5 yalign 0.5 "...
Re: Is this text behaviour possible in Ren'py
Posted: Thu May 02, 2013 5:19 pm
by Kinsman
You're lucky I was doing some similar experiments in the weeks before your question came up.
The trick is to keep the old and new text in separate variables, and also to make sure the say screen doesn't re-animate the two sentences, if you're doing something other than changing the dialogue. You can use Character callbacks to manage both.
Here's a project file with a demonstration. Hope you can use it.
Re: Is this text behaviour possible in Ren'py
Posted: Sun Sep 29, 2013 1:07 pm
by xavimat
Kinsman wrote:You're lucky I was doing some similar experiments in the weeks before your question came up.
The trick is to keep the old and new text in separate variables, and also to make sure the say screen doesn't re-animate the two sentences, if you're doing something other than changing the dialogue. You can use Character callbacks to manage both.
Here's a project file with a demonstration. Hope you can use it.
This effect is really nice!
I've been trying to change the color of the text (because there is no name of the character). The "what_color" in the Character definition works for the entering text (new_text), but the exiting text turns to white. How is it possible to do it?
Thanks!
text old_text id "what" style "say_dialogue" at say_exit
Re: Is this text behaviour possible in Ren'py
Posted: Sun Sep 29, 2013 4:37 pm
by xavimat
Thanks, Alex.
It works, but it doesn't solve the problem.
I'm trying to display a dialogue between two characters. To distinguish between them, I've tried "what_color". The point is that, when a new character speaks, the new text has the new color, but the old text, while disappears, should maintain its former color. With your code, the old text changes to the new color.
EDIT - SOLVED:
I've tried with what_prefix="{color=#44f}" (without what_suffix="{/color}"). And it works perfectly.
I've tried later with what_prefix="{color=#44f}", what_suffix="{/color}" but it raises an strange error: "Open text tag at end of string u'{colo'." When I click the "Ignore" button, the desired effect is shown correctly.
The exception is raised only when the script changes from a character to another, when the same character goes on, there is no error.
Maybe another variable to store the "old_color" is needed?