Search found 989 matches

by Remix
Mon Nov 12, 2018 9:39 am
Forum: Ren'Py Questions and Announcements
Topic: Cannot save the game!
Replies: 2
Views: 76

Re: Cannot save the game!

Firstly, try:

Code: Select all

init python:
    config.use_cpickle = False

    ## TODO: Remove this before releasing the game
See if the traceback is any more useful and whether it points at the offending function more directly...
by Remix
Sun Nov 11, 2018 8:06 am
Forum: Ren'Py Questions and Announcements
Topic: Expected Statement Errors
Replies: 3
Views: 84

Re: Expected Statement Errors

That error is more likely from one of the other made up syntax parts, like: $ if Viciousness = true jump dormvic $ if Creativity = true jump dormcre Just use if Viciousness: jump dormvic What I showed before is the Only Valid basic syntax for menus... try it... create a new project, put it in a star...
by Remix
Sat Nov 10, 2018 11:21 am
Forum: Ren'Py Questions and Announcements
Topic: Expected Statement Errors
Replies: 3
Views: 84

Re: Expected Statement Errors

All your menus have colons after the caption lines (and extra indentation) menu: "Well, is it?" # This is a Caption (not a choice) so it has No colon : "Yes": # This is a choice so it does have a colon (un-indented by 4 spaces from your version) jump cool "No": jump notcool
by Remix
Sat Nov 10, 2018 5:34 am
Forum: Ren'Py Questions and Announcements
Topic: Ren'Py 7.1.2 Prereleased
Replies: 8
Views: 318

Re: Ren'Py 7.1.2 Prereleased

What does this means: "Transforms that are used once in a screen can now be defined inline.". An example maybe? :) See the changelog : https://www.renpy.org/dev-doc/html/changelog.html Also it's possible to set variables inside a screen means that what I was doing now works? like using $foo=True in...
by Remix
Fri Nov 09, 2018 5:47 am
Forum: Ren'Py Questions and Announcements
Topic: random chapter selection
Replies: 4
Views: 86

Re: random chapter selection

jump (as a lexer keyword) is only valid in labels

in screens, use

$ renpy.jump( "add1" )
by Remix
Thu Nov 08, 2018 8:54 pm
Forum: Ren'Py Questions and Announcements
Topic: Web Updater Screen Bar Refresh
Replies: 2
Views: 64

Re: Web Updater Screen Bar Refresh

Does init python: config.per_frame_screens.append( "updater" ) work? Alternatively, maybe timer 0.02 action Function( renpy.redraw, renpy.get_screen( "updater" ), 0 ) repeat True at the end of your screen... (fly typed from memory, so likely not fully correct) Similar with Function( renpy.restart_in...
by Remix
Thu Nov 08, 2018 8:43 pm
Forum: Ren'Py Questions and Announcements
Topic: Expressing a variable in renpy.show_screen
Replies: 3
Views: 67

Re: Expressing a variable in renpy.show_screen

I think I likely answered this on discord, anyway...

$ renpy.show_screen( lastscreen )

Will evaluate the lastscreen variable and show the screen relevant to that
by Remix
Wed Nov 07, 2018 7:32 am
Forum: Ren'Py Questions and Announcements
Topic: Current Battery Level
Replies: 9
Views: 282

Re: Current Battery Level

StaticValue would be the bar you want... On an aside; you could pull pygame_sdl2 from the alias within display.behavior rather than import... screen power_status(): $ pwr = renpy.display.behavior.pygame.power.get_power_info() fixed: area (0.85, 0.0, 0.15, 0.1) fixed: pos (0,0) bar value StaticValue(...
by Remix
Tue Nov 06, 2018 4:31 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I use & declare variables without the $ symbol?
Replies: 17
Views: 203

Re: How do I use & declare variables without the $ symbol?

retain_after_load is almost certainly NOT what you want... It may *appear* to do what you want while the game is open yet will do nothing useful if you close the game, re-open it and load (unless you have progressed dialogue prior to the save, which negates the need to try that as a workaround) Ren'...
by Remix
Tue Nov 06, 2018 3:53 pm
Forum: Ren'Py Questions and Announcements
Topic: Proper way to declare screen only, local variables?
Replies: 5
Views: 101

Re: Proper way to declare screen only, local variables?

Have you also considered passing the value as a screen parameter? screen testWindow( test_var = 0 ): text "Passed value was [test_var]" label start: show screen testWindow( 5 ) "..." I'm not sure whether test_var would be local or global using that approach though... Maybe worth checking if you use ...
by Remix
Mon Nov 05, 2018 5:18 pm
Forum: Ren'Py Questions and Announcements
Topic: looping/automatic if statement
Replies: 2
Views: 64

Re: looping/automatic if statement

default oxygen = 10 init python: def monitor_oxygen(): if hasattr(store, 'oxygen'): if getattr(store, 'oxygen') <= 0.0: renpy.jump("asphyxiate") # this tells Ren'Py to run the named function whenever a python line is processed config.python_callbacks.append( monitor_oxygen ) label start: "... gasp"...
by Remix
Mon Nov 05, 2018 7:43 am
Forum: Ren'Py Questions and Announcements
Topic: How do I use & declare variables without the $ symbol?
Replies: 17
Views: 203

Re: How do I use & declare variables without the $ symbol?

Ren'Py does not use a local scope for variables in labels. All variables referenced in labels are effectively global and should therefore be created using the "default" or "define" keywords outside of any control block. Sub-note: It is pretty rare to ever need a label as a function (except for cases...
by Remix
Mon Nov 05, 2018 7:30 am
Forum: Ren'Py Questions and Announcements
Topic: How to use a label like a function?
Replies: 4
Views: 64

Re: How to use a label like a function?

In your use case it would be better to just use a Python function: init python: def testFunction(val): if val = "one": return "hello" else: return "okay" screen test: vbox: # should get set to a value of string "okay" $ globalVariable = testFunction("two") A label as control flow like that would lik...