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.
What I'm generally trying to achieve is a fade in and slide from the left affect. I've only done the fade in effect and I came across an issue.
1. I need the dialogue to start from alpha 0 to visible. Right now it shows the text at 1.0 alpha then drops back down to 0, so it looks like blinking instead of fading in.
2. The transforms affect all the text on the screen. I want this transform to only affect that incoming dialogue.
transform what_fade:
alpha 0
linear 1 alpha 1.0
screen nvl:
window:
style "nvl_window"
has vbox:
style "nvl_vbox"
# Display dialogue.
for who, what, who_id, what_id, window_id in dialogue:
window:
id window_id
has hbox:
spacing 10
if who is not None:
text who id who_id
text what id what_id at what_fade
Last edited by vividXP on Tue Apr 01, 2014 12:09 am, edited 2 times in total.
vividxp.tumblr.com Wọn ṣe bí òtòṣì ò gbọn bí ọlọrò; wón ní ì bá gbón ì bá lówó lọwọ / People think the poor person lacks the wisdom the wealthy person has; they say if one had wisdom, one would be rich
transform what_fade:
alpha 0
linear 1 alpha 1.0
screen nvl:
window:
style "nvl_window"
has vbox:
style "nvl_vbox"
# Display dialogue.
for who, what, who_id, what_id, window_id in dialogue[:-1]:
window:
id window_id
has hbox:
spacing 10
if who is not None:
text who id who_id
text what id what_id
for who, what, who_id, what_id, window_id in dialogue[-1:]:
window:
id window_id
has hbox:
spacing 10
if who is not None:
text who id who_id
text what id what_id at what_fade
vividxp.tumblr.com Wọn ṣe bí òtòṣì ò gbọn bí ọlọrò; wón ní ì bá gbón ì bá lówó lọwọ / People think the poor person lacks the wisdom the wealthy person has; they say if one had wisdom, one would be rich
I ended up removing it because it didn't work well with the wait tags since they are technically on the same line. It just restarts the transformation. *sigh* But this is still good to know
vividxp.tumblr.com Wọn ṣe bí òtòṣì ò gbọn bí ọlọrò; wón ní ì bá gbón ì bá lówó lọwọ / People think the poor person lacks the wisdom the wealthy person has; they say if one had wisdom, one would be rich
That code doesn't work. But I may have put it in wrong. I put the init python block in script.rpy and what exactly am I replacing when I want to insert the code black that starts with global...my original code or Asceai's code.
I've tried generally all combinations and the result is all the text at alpha 1...no transform at all
vividxp.tumblr.com Wọn ṣe bí òtòṣì ò gbọn bí ọlọrò; wón ní ì bá gbón ì bá lówó lọwọ / People think the poor person lacks the wisdom the wealthy person has; they say if one had wisdom, one would be rich
vividxp.tumblr.com Wọn ṣe bí òtòṣì ò gbọn bí ọlọrò; wón ní ì bá gbón ì bá lówó lọwọ / People think the poor person lacks the wisdom the wealthy person has; they say if one had wisdom, one would be rich