How important is () when making screens?

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
User avatar
Westeford
Regular
Posts: 151
Joined: Mon Jun 19, 2017 4:43 pm
Completed: 12 Hours to Die
Projects: Project Premonition
itch: westeford
Location: United States
Contact:

How important is () when making screens?

#1 Post by Westeford »

I might have to elaborate later, but...
When making screens how important is the ()?
For example:

Code: Select all

screen testimony(): #<-That () is what I mean.
    imagemap:
        ground "debateui_ground"
        #Etcetera        
The reason I ask this is because when using "Check Script (Lint)" it complains when I leave out the () on any screen, but when I add the () to one specific screen, it breaks the game by essentially punishing players who click rapidly.

I guess what I'm asking is are there any real difference between "screen testimony:" and "screen testimony():"?

Sorry if this makes no sense. I'll try to elaborate later if need be.
Thanks for your time.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: How important is () when making screens?

#2 Post by trooper6 »

There is a difference. It is best practice to put the parenthesis in. It makes the game run better.
See here: https://www.renpy.org/doc/html/screen_o ... meter-list
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

Post Reply

Who is online

Users browsing this forum: Google [Bot], Sugar_and_rice