Search found 100 matches

by strayerror
Mon Jan 20, 2020 2:51 pm
Forum: Ren'Py Questions and Announcements
Topic: How to 'stop' game when I show player interactivemap?
Replies: 7
Views: 120

Re: How to 'stop' game when I show player interactivemap?

You don't need a Return() that way, you can simply Hide() as action. That doesn't require the need to directly hide the screen. Anyway, I suppose that button is there to actually show somethingm, probably that map screen... Who knows XD. Unfortunately using Hide (and removing the hide screen line c...
by strayerror
Sun Jan 19, 2020 11:38 pm
Forum: Ren'Py Questions and Announcements
Topic: How to 'stop' game when I show player interactivemap?
Replies: 7
Views: 120

Re: How to 'stop' game when I show player interactivemap?

You can use screenlang's modal True to achieve this effect. If we use the screen to intercept interactions similar to the suggestion by gas , but use show screen rather than call screen we're able to display it overlaid on dialogue instead of outright replacing it. The caveat to this approach is tha...
by strayerror
Mon Jan 13, 2020 5:10 am
Forum: Ren'Py Questions and Announcements
Topic: Screen button click not registering?
Replies: 4
Views: 166

Re: Screen button click not registering?

Yeah, that's weird. Don't know what's up. That said, it appears you can bypass the problem by using SetDict, if that's all you needed. Thanks! Using SetDict does cover this case, but reading the code doesn't seem to yield any hint as to why one works and the other does not. :/ You call the screen. ...
by strayerror
Sun Jan 12, 2020 3:30 pm
Forum: Ren'Py Questions and Announcements
Topic: Screen button click not registering?
Replies: 4
Views: 166

Screen button click not registering?

Disclaimer, I'm sure I'm doing something wonderfully daft, but I can't see it, time to call in the big-guns! The code below is little more than a call screen with a single button intended to update a list item, however when coming from the Example dialogue line, the button ignores the first click. A...
by strayerror
Sat Jan 04, 2020 6:52 am
Forum: Ren'Py Questions and Announcements
Topic: How can I calculate the current size of a Screen frame?
Replies: 1
Views: 205

Re: How can I calculate the current size of a Screen frame?

Really depends what you need it for, and hope to do with it. I strongly advise against using this in anything outside of debugging and/or toy projects, but here is one possible way to get that information: label start: show screen New_screen() '[frame_size] var not available until next interaction' ...
by strayerror
Thu Jan 02, 2020 11:31 pm
Forum: Ren'Py Questions and Announcements
Topic: Can I use "call" for multiple menu choices?
Replies: 11
Views: 415

Re: Can I use "call" for multiple menu choices?

You could do something like this, which uses variables to denote which characters are unlocked (i.e. lens_unlocked ) and then a set to keep track of what's been clicked this time around, this might allow use of a single menu that can be reused throughout the game as more characters are unlocked, or ...
by strayerror
Wed Jan 01, 2020 12:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Random Pause Duration (Renpy randint not working)
Replies: 4
Views: 266

Re: Random Pause Duration (Renpy randint not working)

Another option, extending Remix's original suggestion (and only useful if the limits on your random int don't change between images) could be to use a parameterised transform. It comes down to how much flexibility vs complexity you need and what you're comfortable maintaining. :) image anim: # sampl...
by strayerror
Sun Dec 29, 2019 1:21 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Setting layer for custom displayable with Render.place?
Replies: 2
Views: 240

Re: Setting layer for custom displayable with Render.place?

You could just move the add mtt line to the end of your screen definition as items are layered atop each other in the order they're defined within the screen; i.e. last thing added ends up on top. If you still want to display the CDD on another layer (google the renpy docs for how to add custom laye...
by strayerror
Fri Dec 27, 2019 12:32 pm
Forum: Ren'Py Questions and Announcements
Topic: call_in_new_context?
Replies: 3
Views: 268

Re: call_in_new_context?

1. I believe the save would restore the game to the last interaction previous to the call_in_new_context occurring. i.e. the next click by the player would trigger the an_object.a_method() call. 2. Correct, that should prevent players "sticking" when rolling forward. 3. Exactly! Glad it helped! :)
by strayerror
Thu Dec 26, 2019 6:29 pm
Forum: Ren'Py Questions and Announcements
Topic: call_in_new_context?
Replies: 3
Views: 268

Re: call_in_new_context?

The answer very much depends on the behaviour you need from your called label. You're correct that call_in_new_context will return control to your python code (along with any value returned by the label), the potential gotcha is that any recording of rollback within that label will be lost when it r...
by strayerror
Mon Dec 23, 2019 6:12 pm
Forum: Ren'Py Questions and Announcements
Topic: Sudden Error: "Arguments supplied, but parameter list not present"
Replies: 5
Views: 328

Re: Sudden Error: "Arguments supplied, but parameter list not present"

Is it possible you've recently started using as variables, names like _args or _kwargs ? Having either set globally could potentially cause this, as can be seen by running the demo code below. If it is the case, it's worth remembering that variables with a leading underscore ( _ ) are reserved for R...
by strayerror
Fri Dec 20, 2019 7:07 pm
Forum: Ren'Py Questions and Announcements
Topic: FileSave, FileLoad and Restart Game prompts
Replies: 3
Views: 355

Re: FileSave, FileLoad and Restart Game prompts

You can prevent the selected state on your buttons by explicitly declaring it as False : textbutton _('Load'): action FileLoad(1) selected False textbutton _('Save'): action FileSave(1) selected False As for checking a save file exists, you can do that using FileLoadable , so to (for example) show a...
by strayerror
Mon Dec 02, 2019 3:58 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Return a Function with a variable name?
Replies: 5
Views: 401

Re: Return a Function with a variable name?

You could just assign the functions directly, thus: python: def Cool_Func(): #whatever... return def Awesome_Func(): #whatever... return def Hella_Func(): #whatever... return $ PushTheButton = Awesome_Func $ PushTheButton() # this will exec Awesome_Func [...] $ PushTheButton = Hella_Func $ PushTheBu...
by strayerror
Tue Nov 26, 2019 10:48 pm
Forum: Ren'Py Questions and Announcements
Topic: Layeredimage, hiding hair only if hood's equipped.
Replies: 4
Views: 358

Re: Layeredimage, hiding hair only if hood's equipped.

Or for super simple, maybe you get away with simply reordering your if statement?

Code: Select all

layeredimage character1:
	always:
		"baseModel.png"
	if hood == True:
		null # or hood image
	elif hair == 1:
		"hair1.png"
	elif hair == 2:
		"hair2.png"
by strayerror
Tue Nov 26, 2019 10:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Layeredimage, hiding hair only if hood's equipped.
Replies: 4
Views: 358

Re: Layeredimage, hiding hair only if hood's equipped.

Not tested but iirc you can do something like this, although it does mean you'd have to use attributes rather than rely on an external variable. layeredimage character1: always: 'baseModel.png' group hair only_if 'nohood': attribute hair1 default 'hair1.png' attribute hair2 'hair2.png' group hood: a...