Ren'Py Coding Questions

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
User avatar
Sampai
Newbie
Posts: 3
Joined: Tue Jan 29, 2019 10:06 pm
Tumblr: sampai-gamedev
itch: itssampai.itch.io
Contact:

Ren'Py Coding Questions

#1 Post 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.

User avatar
IronForPistons
Regular
Posts: 34
Joined: Wed Jan 31, 2018 11:25 pm
Projects: Panzer Hearts (Editor), Picture Perfect Romance (Editor), Children of Cosmos (Editor)
Organization: Crystal Compass
Location: USA (Eastern Time)
Contact:

Re: Ren'Py Coding Questions

#2 Post 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
Feel free to call me Iron!

Interested in editing or proofreading services? I do both, for free or trade!

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Ren'Py Coding Questions

#3 Post 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

User avatar
Sampai
Newbie
Posts: 3
Joined: Tue Jan 29, 2019 10:06 pm
Tumblr: sampai-gamedev
itch: itssampai.itch.io
Contact:

Re: Ren'Py Coding Questions

#4 Post by Sampai »

I shall look into all the links you have both sent me and try to see if any of these solutions work. :)

User avatar
arty
Regular
Posts: 120
Joined: Sat Jan 06, 2018 11:55 am
Completed: White Monday
Projects: HATE is a 4 Letter Word
Organization: KATHARSIS ART
itch: artys-games
Contact:

Re: Ren'Py Coding Questions

#5 Post 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.

User avatar
Sampai
Newbie
Posts: 3
Joined: Tue Jan 29, 2019 10:06 pm
Tumblr: sampai-gamedev
itch: itssampai.itch.io
Contact:

Re: Ren'Py Coding Questions

#6 Post by Sampai »

Thank you all so much for your help! I managed to get my code working for my game :D

Post Reply

Who is online

Users browsing this forum: No registered users