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 know that Ren'Py has the monologue mode {clear} tag, but I was wondering if there was something equivalent that could work for a single line. For example, if
"""
{clear}
This is a simple example.
{clear}
The text is very long.
"""
I assumed the next best thing would be a custom text tag. However, any attempts at changing the nvl_list result in the function being called too early/unexpected behaviour, resulting in the NVL in the text above the line with the text tag getting cleared every line.
Last edited by SinSisters on Wed Dec 14, 2022 3:50 pm, edited 1 time in total.
nvl clear is supposed to be it's own statement. Monologue mode has this pseudo-tag because it is broken down into separate statements internally anyway, and it does make sense to not force developer to break monologue mode every time you need to clear the screen.
A say statement is a single statement. You can put clear statement before or after it, but not in the middle. You cannot do that with tags, because tags are evalueated early and often, so they cannot have any side effects.
You can pass your line to some function, which will separate sentences and tags, transforming single string into a list of strings, and some other type denoting a clear command. Then you can pass it to some other funtion, which will execute all list elements in order, saying sentences and clearing screen when it is needed.