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.
Okay, maybe this is a stupid question, but I've been trying for hours and I can't find a solution.
For our game we want to use a stylish dialogue box similar to the one used in Persona 5, with the text slightly inclined to the left. So I'm trying to add some rotation properties to the dialogue text. The only way I've found to do that is to use rotate transform property, so:
transform txt_rotate(g):
rotate g #Rotate displayable by g angle
screen say(who, what):
# Not pasting all the contents of say screen to save space
window:
text what id "what" at txt_rotate(-4)
#Text should be displayed slightly inclined to the left.
This worked perfectly fine in a custom test screen, but in the say screen, the text doesn't appear anywhere. I'm guessing the transform is somehow nulling the default style properties of text but, I thought style and transform where applied independently? Am I doing this the wrong way?
Last edited by ReDZiX on Wed Feb 14, 2018 1:04 pm, edited 1 time in total.
I happened to be testing something else with your code still in and realized that the text gets more deformed the longer it is--I had only tested with single words. I found a work-around for it, though, try adding:
irredeemable wrote: ↑Tue Feb 13, 2018 7:57 pm
I happened to be testing something else with your code still in and realized that the text gets more deformed the longer it is--I had only tested with single words. I found a work-around for it, though, try adding:
Just as you said the problem happened with large amounts of text, I later on re-read the documentation and realized I had to set xanchor and yanchor to 0.5 or else the position would randomly change depending on the size of text; that seemed to fix it, but I'll be sure to test your variant too, seems better.