Watch + get_file_line

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.
Post Reply
Message
Author
bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

Watch + get_file_line

#1 Post by bookie »

I've been trying to get this to work but have come up with an error every time. I think the problem is that I don't know what to do with **properties. I've gone through the reference stuff but the termonology goes over my head. ^_^;

I put this code after label start:

Code: Select all

$ renpy.watch (renpy.get_filename_line (), style='default', **properties)
And then what do I do with **properties? I tried stuff like

Code: Select all

   $ renpy.watch (renpy.get_filename_line (), style='default', style.color = (128, 255, 128, 255))
or

Code: Select all

 $ renpy.watch (renpy.get_filename_line (), style='default', color = (128, 255, 128, 255))
Both give me errors.

Since I really want to get /something/ presentable done for IntRenAiMo, I figured I'd swallow my pride and ask another stupid question. Sorry about this but I do much better with examples than I do with explination. :(

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

You need to put the first argument of watch into quotes:

Code: Select all

$ renpy.watch ("renpy.get_filename_line ()", style='default', color = (128, 255, 128, 255))
This also shows how you use the color property, xpos and ypos are also popular this time of year.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#3 Post by bookie »

Omg yey!

Thank you sooo much!

Dre
Regular
Posts: 118
Joined: Tue Jan 25, 2005 8:55 pm
Location: Allugic.com
Contact:

#4 Post by Dre »

Humm...not to sound newbish here but, what's the meaning behind that piece of script?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#5 Post by PyTom »

It puts the current filename and line number up in the corner of the screen, useful for debugging purposes.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Dre
Regular
Posts: 118
Joined: Tue Jan 25, 2005 8:55 pm
Location: Allugic.com
Contact:

#6 Post by Dre »

Ah, I see.

Post Reply

Who is online

Users browsing this forum: Google [Bot]