Page 1 of 1

Ren'Py Coding Questions

Posted: Tue Jan 29, 2019 10:35 pm
by Sampai
Hi there!

Currently I am making a visual novel game as a part of my Game Development studies. I have finished writing all of the code, however there are a few issues. I was wondering if there is a way to call a line of code in the same script, or should I make each chapter have its own script and if so how do I call the separate scripts? I am still learning as I go and any help would be appreciated.

Re: Ren'Py Coding Questions

Posted: Tue Jan 29, 2019 11:18 pm
by IronForPistons
Hi there! It sounds like you would benefit from reading through the quickstart guide: https://www.renpy.org/doc/html/quickstart.html

The Ren'Py discord is a great resource as well - feel free to join up and ask questions there! https://discord.gg/6ckxWYm

Re: Ren'Py Coding Questions

Posted: Wed Jan 30, 2019 5:00 am
by Karl_C
Sampai wrote: Tue Jan 29, 2019 10:35 pm I was wondering if there is a way to call a line of code in the same script, or should I make each chapter have its own script and if so how do I call the separate scripts?
I'm not sure if you're talking about something like that: Developer Tools: Warping to a line?

Or do you simply want to jump to somewhere in your script? Labels & Control Flow

Re: Ren'Py Coding Questions

Posted: Wed Feb 06, 2019 1:19 am
by Sampai
I shall look into all the links you have both sent me and try to see if any of these solutions work. :)

Re: Ren'Py Coding Questions

Posted: Sat Feb 09, 2019 8:27 am
by arty
I would split up the scenes into seperate script files. You can just put a label at the beginning of each file and jump to the label from the end of the previous file.

Code: Select all

label sample1:
    blabla your code
^at the beginning of the file

Code: Select all

jump sample1
^at the end of the previous file

Additionally to the Quickstart Guide, there's also a little Beginner's Tutorial that I wrote in an attempt to simplify the QG (shameless self promotion, sorry): viewtopic.php?f=51&t=50946
Labels are explained on page 8 of the doc.

Re: Ren'Py Coding Questions

Posted: Mon Feb 11, 2019 6:37 pm
by Sampai
Thank you all so much for your help! I managed to get my code working for my game :D