Previous Text Lines fading in NVL mode.
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.
-
- Newbie
- Posts: 1
- Joined: Tue May 29, 2012 12:21 pm
- Contact:
Previous Text Lines fading in NVL mode.
I was looking through the documentation and it didn't seem like there was a straightfoward way to do this. Can anyone instruct me on how to implement this feature (if it's possible?)
Basically, in NVL mode, as the user goes through the lines of text, I only want the most recent line to be displayed with full opacity, the previous lines that are on screen should be faded. I.E. Everytime a new line is displayed on screen, the previous line needs to fade out.
Thank you!
Basically, in NVL mode, as the user goes through the lines of text, I only want the most recent line to be displayed with full opacity, the previous lines that are on screen should be faded. I.E. Everytime a new line is displayed on screen, the previous line needs to fade out.
Thank you!
- Samidarenina
- Regular
- Posts: 137
- Joined: Sun Aug 01, 2010 1:21 pm
- Contact:
Re: Previous Text Lines fading in NVL mode.
I don't think that's possible as far as I know. The way the text works right now wouldn't allow for it.
But I could be wrong. I'd be happy if someone could prove me wrong here.
But I could be wrong. I'd be happy if someone could prove me wrong here.
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
Re: Previous Text Lines fading in NVL mode.
I'm going to bump this because I would like to know if anybody has an answer.
-
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: Previous Text Lines fading in NVL mode.
I can't seem to get the animation working right, but the following should be close to what you're looking for:
Code: Select all
transform nvl_faded:
alpha 0.5
screen nvl:
window:
style "nvl_window"
has vbox:
style "nvl_vbox"
# Display dialogue.
for i in range(0, len(dialogue)):
$ (who, what, who_id, what_id, window_id) = dialogue[i]
window:
id window_id
has hbox:
spacing 10
if i == len(dialogue) - 1:
if who is not None:
text who id who_id
text what id what_id
else:
if who is not None:
text who id who_id at nvl_faded
text what id what_id at nvl_faded
# Display a menu, if given.
if items:
vbox:
id "menu"
for caption, action, chosen in items:
if action:
button:
style "nvl_menu_choice_button"
action action
text caption style "nvl_menu_choice"
else:
text caption style "nvl_dialogue"
add SideImage() xalign 0.0 yalign 1.0
use quick_menu
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
Re: Previous Text Lines fading in NVL mode.
Cool I put it in and it greys out the preceding text. I think I will leave it in. If anybody figures out how to have it fade out the rest of the way let me know.
- Samidarenina
- Regular
- Posts: 137
- Joined: Sun Aug 01, 2010 1:21 pm
- Contact:
Re: Previous Text Lines fading in NVL mode.
I've modified the code a bit to throw in the fade, too.
It should be noted that it does have one bug though. When using extend and {w}/{p} it fades the last line one more time.
But if you don't use neither of those, it should work perfectly.
I'll try finding a way to fix this bug in the meanwhile.
EDIT:
Also, let me know if someone finds a way to also let down the transparency of outlines.
Code: Select all
transform nvl_faded:
linear .5 alpha 0.5
transform nvl_faded2:
alpha 0.5
screen nvl:
window:
style "nvl_window"
has vbox:
style "nvl_vbox"
# Display dialogue.
for i in range(0, len(dialogue)):
$ (who, what, who_id, what_id, window_id) = dialogue[i]
window:
id window_id
has hbox:
spacing 10
if i == len(dialogue) - 1:
if who is not None:
text who id who_id
text what id what_id
else:
if i == len(dialogue) - 2:
if who is not None:
text who id who_id at nvl_faded
text what id what_id at nvl_faded
else
if who is not None:
text who id who_id at nvl_faded2
text what id what_id at nvl_faded2
# Display a menu, if given.
if items:
vbox:
id "menu"
for caption, action, chosen in items:
if action:
button:
style "nvl_menu_choice_button"
action action
text caption style "nvl_menu_choice"
else:
text caption style "nvl_dialogue"
add SideImage() xalign 0.0 yalign 1.0
But if you don't use neither of those, it should work perfectly.
I'll try finding a way to fix this bug in the meanwhile.
EDIT:
Also, let me know if someone finds a way to also let down the transparency of outlines.
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
Who is online
Users browsing this forum: Nightpxel