That's precisely what you'd expect. The call to pause() makes Ren'Py think the two comments are separate lines, and so it erases the screen between them.
(Well, actually, it's a bit more complicated than that, since you're using ui.text() rather than just say statements. But it's the same basic principle - stuff produced by calls to ui.* functions are also blanked every statement.)
There are a couple of ways to do what you want. One is to just use normal say statements but use the "extend" speaker, which adds the new comment on to the end of what's been said so far:
Code: Select all
"First score:"
pause(1)
extend "Second score:"
If you wanted to include some numbers as well as the text, you could do that with interpolation, using %(variablename):
Code: Select all
"First score: %(s1)d" % This inserts the value of the numeric variable s1
pause(1)
extend "Second score: %(s2)d"
Another way to do what you want is to use "show text", which puts a string of text on screen and treats it like an image:
Code: Select all
show text "First score:" at Position(ypos=0.9)
pause(1)
show text "First score:\nSecond score:" at Position(ypos=0.9)
This is mentioned in the
documentationfor the show statement.
If you want to have multiple text images on screen at once, you can use the
ParameterizedText function:
Code: Select all
init:
image text08 = renpy.ParameterizedText(ypos=0.8)
image text09 = renpy.ParameterizedText(ypos=0.9)
label start:
show text08 "First score:"
pause(1)
show text09 "Second score:"
A third way to do it is using overlays: see
Overlays for details.