SOLVED! Is there a way to "comment" an entire label
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.
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.
SOLVED! Is there a way to "comment" an entire label
Hello all.
Wondering if it is possible for me to use a hash mark (#) on a label and Ren'Py would ignore the entirety of the label and all its contents under that label. It would be much more convenient that way. If it is not doable, then is the only solution to add hash marks (#) on each line and block? Or is there a different code to implement the same intention?
I currently have labels with a large amount of content that I'd rather keep in the .rpy file (not cut and paste to a separate file) that I'll hide/ignore until I will need it/will edit it after, and adding individual # will be tiresome.
Thank you.
Wondering if it is possible for me to use a hash mark (#) on a label and Ren'Py would ignore the entirety of the label and all its contents under that label. It would be much more convenient that way. If it is not doable, then is the only solution to add hash marks (#) on each line and block? Or is there a different code to implement the same intention?
I currently have labels with a large amount of content that I'd rather keep in the .rpy file (not cut and paste to a separate file) that I'll hide/ignore until I will need it/will edit it after, and adding individual # will be tiresome.
Thank you.
Last edited by nerupuff on Tue Oct 01, 2019 8:33 am, edited 1 time in total.
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Is there a way to "comment" an entire label
nerupuff wrote: ↑Mon Sep 30, 2019 10:56 pm Hello all.
Wondering if it is possible for me to use a hash mark (#) on a label and Ren'Py would ignore the entirety of the label and all its contents under that label. It would be much more convenient that way. If it is not doable, then is the only solution to add hash marks (#) on each line and block? Or is there a different code to implement the same intention?
I currently have labels with a large amount of content that I'd rather keep in the .rpy file (not cut and paste to a separate file) that I'll hide/ignore until I will need it/will edit it after, and adding individual # will be tiresome.
Thank you.
I dont think that is possible as it seen here to the documentation.
https://www.renpy.org/doc/html/language ... l#comments
Re: Is there a way to "comment" an entire label
Alright, but do you have any suggestions that could help?
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Is there a way to "comment" an entire label
How about this?
https://www.renpy.org/doc/html/text.html#text-tag-#
I dont think it can use hastags in game but give it a try.
Re: Is there a way to "comment" an entire label
Errr, no. That's not related to the question at all. I appreciate the effort, but I'm hoping other people will answer and provide any suggestions to point me in the right direction.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Is there a way to "comment" an entire label
Two options.
If you use editra as your editor, you can highlight a chunk of text and in the drop down menu at the top of the program you'll find an option to "toggle comment"
I believe shift + tab is the shortcut.
I find this extremely handy.
Option two is my actual recommendation, however.
Instead of commenting out an entire label, simply add a jump at the end of the previous label that skips right over the label entirely.
Remove the jump when the label is ready.
Alternatively, place the label/s at the end of your script and make sure there is a return at the end of the last label you want to use.
If you use editra as your editor, you can highlight a chunk of text and in the drop down menu at the top of the program you'll find an option to "toggle comment"
I believe shift + tab is the shortcut.
I find this extremely handy.
Option two is my actual recommendation, however.
Instead of commenting out an entire label, simply add a jump at the end of the previous label that skips right over the label entirely.
Remove the jump when the label is ready.
Alternatively, place the label/s at the end of your script and make sure there is a return at the end of the last label you want to use.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Is there a way to "comment" an entire label
Or use the triple quotes.
"""
Using three quotes will comment out
a whole block of quotes.
"""
"""
Using three quotes will comment out
a whole block of quotes.
"""
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: Is there a way to "comment" an entire label
The most common and almost present shortcut key for comments is ctrl + /. Select all the block of codes then hit ctrl + /. It always works on every IDEs that I use, also on the text editor that I use.
You can also try the triple quotes technique, but it has some downsides if you are optimizing the game, as python doesn't really ignore a block of texts enclosed with these, rather it is being dumped in garbage collection or whatsoever. Not quite sure about that, but this is of course based on what I read.
Re: Is there a way to "comment" an entire label
I don't use editra, so I didn't try that out (I use Atom, so shift + tab actually removes my indentation). BUT, your second suggestion is the more practical option, so I'll keep it in mind. It is definitely practical (the jumps), just gotta remember that I did that. The alternative, to keep it at the end of the script, I might end up forgetting lol. Thank you!Imperf3kt wrote: ↑Tue Oct 01, 2019 12:20 am Option two is my actual recommendation, however.
Instead of commenting out an entire label, simply add a jump at the end of the previous label that skips right over the label entirely.
Remove the jump when the label is ready.
Alternatively, place the label/s at the end of your script and make sure there is a return at the end of the last label you want to use.
It doesn't seem to work on Atom, but maybe other text editors, it works too. Thank you!
THANK YOU SO MUCH!!! This is such a handy shortcut that I can use on on Atom! This is such a lifesaver! Marking this as solved!hell_oh_world wrote: ↑Tue Oct 01, 2019 3:16 am The most common and almost present shortcut key for comments is ctrl + /. Select all the block of codes then hit ctrl + /. It always works on every IDEs that I use, also on the text editor that I use.
Re: SOLVED! Is there a way to "comment" an entire label
Better yet add jump to start of label itself.
So this
become this
This way whole game will treat event_234 same way, without knowing if it is ready or not, maintaining gameflow. Once you ready simple remove jump to skip and skip label.
So this
Code: Select all
label event_234:
bob 'blablabla'
bob 'bye!'
return
Code: Select all
label event_234:
jump event_234_skip
bob 'blablabla'
bob 'bye!'
label event_234_skip:
return # or jump or however else event_234 label supposed to end, can be nothing at all if you use labels sequentially
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350
Who is online
Users browsing this forum: Majestic-12 [Bot]