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.
I'm trying to make it so if a NEW message is added to the dialog, it will fade in, otherwise it doesn't. However all dialog just pops up with no animation at all.
This is only a guess, as I don't fully understand some parts of your code ($ statements inside addmsg() function? Does that work?) but it may have to do with your incoming_message transform, that I don't see here, maybe you need to link it to the text, instead of the frame, and maybe modify your code a little, again I'm not sure. Exactly how is this screen supposed to behave and how do you show it/call it in game?
DannX wrote: ↑Mon Jun 18, 2018 1:17 pm
This is only a guess, as I don't fully understand some parts of your code ($ statements inside addmsg() function? Does that work?) but it may have to do with your incoming_message transform, that I don't see here, maybe you need to link it to the text, instead of the frame, and maybe modify your code a little, again I'm not sure. Exactly how is this screen supposed to behave and how do you show it/call it in game?
The Script.rpy file has some other bits too, I just removed some parts. Here's the full script:
I think the problem might be the if/else statements in the screen.
The first if always is executed because message[1] is always in oldmessages from the start, so it always show the frame without animation, I think. It might be better if you define the variables as empty lists (arrays) first with default statement, and then fill them after the game starts and as the messages are shown. Maybe something like this:
default messages = []
default oldmessages = []
label start:
scene bg room
e "let me whip out my phone"
show phone at phone_pickup
$ renpy.pause(0.2)
$ messages = [["Marina", "Die fatty"], ["Josh", "Die whale"],]
show screen phonescr(messages, oldmessages)
$ oldmessages = ["Die fatty", "Die whale"]
$ renpy.pause(2)
$ addmsg(["xxx","Ok?"])
$ renpy.pause(2)
DannX wrote: ↑Mon Jun 18, 2018 2:51 pm
I think the problem might be the if/else statements in the screen.
The first if always is executed because message[1] is always in oldmessages from the start, so it always show the frame without animation, I think. It might be better if you define the variables as empty lists (arrays) first with default statement, and then fill them after the game starts and as the messages are shown. Maybe something like this:
default messages = []
default oldmessages = []
label start:
scene bg room
e "let me whip out my phone"
show phone at phone_pickup
$ renpy.pause(0.2)
$ messages = [["Marina", "Die fatty"], ["Josh", "Die whale"],]
show screen phonescr(messages, oldmessages)
$ oldmessages = ["Die fatty", "Die whale"]
$ renpy.pause(2)
$ addmsg(["xxx","Ok?"])
$ renpy.pause(2)
Thank you so much! Although this didn't exactly fix it on it's own I figured out the issue! I was referencing the updated version of oldmessages rather than the version the texts are supposed to use!