Is this text behaviour possible in Ren'py
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 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.
- mugenjohncel
- Hentai Poofter
- Posts: 2121
- Joined: Sat Feb 04, 2006 11:13 pm
- Organization: Studio Mugenjohncel
- Location: Philippines
- Contact:
Is this text behaviour possible in Ren'py
CLICK HERE TO WATCH VIDEO
Is this text behaviour possible in Ren'py?... If it is... may I humbly beg how it is done?...
"POOF" (Disappears)
- 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:
Re: Is this text behaviour possible in Ren'py
The closest I was able to get to this effect was with:
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.
Code: Select all
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
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- mugenjohncel
- Hentai Poofter
- Posts: 2121
- Joined: Sat Feb 04, 2006 11:13 pm
- Organization: Studio Mugenjohncel
- Location: Philippines
- Contact:
Re: Is this text behaviour possible in Ren'py
Thanks!... This will do for now... One last thing...how to position the text about 200px down instead of being at the very center?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.
"POOF" (Disappears)
-
- Veteran
- Posts: 356
- Joined: Mon Mar 11, 2013 11:03 pm
- Contact:
Re: Is this text behaviour possible in Ren'py
..." xalign 0.5 yalign 0.5 "...
-
- Regular
- Posts: 130
- Joined: Sun Jul 26, 2009 7:07 pm
- Location: Fredericton, NB, Canada
- Contact:
Re: Is this text behaviour possible in Ren'py
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.
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.
- Attachments
-
- ScrollSay.zip
- (639.45 KiB) Downloaded 181 times
Flash To Ren'Py Exporter
See the Cookbook thread
See the Cookbook thread
- xavimat
- Eileen-Class Veteran
- Posts: 1461
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Discord: xavimat
- Contact:
Re: Is this text behaviour possible in Ren'py
This effect is really nice!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.
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!
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Re: Is this text behaviour possible in Ren'py
In say screen change the lineto
Code: Select all
text old_text style "say_dialogue" at say_exit
Code: Select all
text old_text id "what" style "say_dialogue" at say_exit
- xavimat
- Eileen-Class Veteran
- Posts: 1461
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Discord: xavimat
- Contact:
Re: Is this text behaviour possible in Ren'py
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?
It works, but it doesn't solve the problem.
I'm trying to display a dialogue between two characters.
EDIT - SOLVED:
I've tried with what_prefix="{color=#44f}" (without what_suffix="{/color}"). And it works perfectly.
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?
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Who is online
Users browsing this forum: Majestic-12 [Bot], snotwurm