Code: Select all
screen Part1:
frame:
background "cafe (1).jpg"
viewport:
side "c b r"
draggable True
mousewheel True
add "confirm.png"
vbox:
text "Pikachu" #1 (This space is the 'name' of the character)
frame:
background "textbox4.png" #2 (I will be using different textboxes)
hbox:
spacing 20
image "pika1.jpg" #3 (character image/emoji)
text "pika pika peeeee" at truecenter #4 (dialogue)
vbox:
xpos 0.5
text "Charmander" xalign
frame:
background "textbox4.png"
hbox:
spacing 20
image "charmander1.png"
text "charmander char char" at truecenter
Right now I have to repeat the whole block to get in another line of text. Questions-
1. How can I write this out so I wouldn't have to repeat 'vbox: frame: hbox:' every time I want to add a new message? Basically, each new line of text has 4 places that change, the 'name', 'textbox', 'image' and 'dialogue'. So, I guess a system where these 4 places become variables which I can update is what I'd be trying to make? I seriously suck at python, my only experience is a head first book, so I have (almost) no clue what or how to do this.
2. How do I stop after each message and have the user 'click to continue' ? I tried using $ renpy.pause() but the game sorta freezes; no amount of clicking can progress the game. The only other way I can think of is a roundabout way of using ShowIf() and setVariable(), but that would mean more lines of redundant code per block and I'm hoping there's a better way to do this.
3. To add new dialogue, each block of code has to be indented below the other. It's not much hassle with 2 lines of dialogue, but in a game with hundreds of dialogues, I'm thinking it might become a problem. Do I need to change something? Or is 400 spaces before a line common in coding?
Sorry for the long post, it's a week's worth of effort and questions. I appreciate your time, thanks!