Search found 2402 matches

by Ocelot
Thu Feb 22, 2024 2:53 am
Forum: Ren'Py Questions and Announcements
Topic: renpy.count_seen_dialogue_blocks() always returns 0
Replies: 5
Views: 191

Re: renpy.count_seen_dialogue_blocks() always returns 0

Yes. Because they are dialogue blocks. 14 of them. Python code are not dialogue blocks. Jump statement are not dialogue blocks.
by Ocelot
Sat Feb 17, 2024 12:36 pm
Forum: Ren'Py Questions and Announcements
Topic: Darken all but part of the screen
Replies: 3
Views: 562

Re: Darken all but part of the screen

Your first problem is that you are creating trasparent image and posing it over transparent canvas. You need to work backwards: pose a opaque image over transparent canvas and use it in AlphaMask inverted You code can work if you make Solid in highlight opaque and add invert=True to the AlphaMask ca...
by Ocelot
Sat Feb 17, 2024 5:16 am
Forum: Ren'Py Questions and Announcements
Topic: Is there something I can run, like Lint, which can detect unused files?
Replies: 2
Views: 200

Re: Is there something I can run, like Lint, which can detect unused files?

First of all, making such a tool, which will accurately work for any kind of RenPy game, is mathematically impossible (it is equivalent to solving halting problem). On the other hand, if your game does not use DynamicImage, loading from external files, dynamically constructed paths and similar thing...
by Ocelot
Sat Feb 17, 2024 4:55 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Making the player click on multiple imagebuttons before closing the screen
Replies: 2
Views: 219

Re: Making the player click on multiple imagebuttons before closing the screen

1) You can use ATL transformations with arguments to make button appear after some time. transform delay_appear(delay=0.0): alpha 0.0 pause delay linear 0.5 alpha 1.0 screen cards(): imagebutton: at delay_appear(0.0) # . . . imagebutton: at delay_appear(0.5) # . . . imagebutton: at delay_appear(1.0)...
by Ocelot
Wed Feb 14, 2024 4:41 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Bypassing imagebutton's hovred-action corelation under condition
Replies: 5
Views: 241

Re: Bypassing imagebutton's hovred-action corelation under condition

Button with no action is considered insensitive and does not respond to evens. You have to have an action to have a working button.
by Ocelot
Wed Feb 14, 2024 9:32 am
Forum: Ren'Py Questions and Announcements
Topic: Exception caught when cycling through a list via a button
Replies: 4
Views: 267

Re: Exception caught when cycling through a list via a button

Code: Select all

default var = 0
define name = "var"

CycleVariable("var", [0, 1]) # Cycles var through 0 and 1
CycleVariable(name, [0, 1]) # Cycles var through 0 and 1
Second comment is not a mistake. list1"list1".
by Ocelot
Fri Feb 09, 2024 7:52 am
Forum: Ren'Py Questions and Announcements
Topic: How to translate python list?
Replies: 1
Views: 324

Re: How to translate python list?

Mark individual strings as tranlateable: https://www.renpy.org/doc/html/translation.html#id0 default policeman_comments_list = [ _("Don't push yourself too hard......"), _("Need my help?"), _("In this country, we are the police who guard justice and order, and we will be on ...
by Ocelot
Thu Feb 08, 2024 12:48 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Creating a loop that searches a specific variable
Replies: 8
Views: 1017

Re: Creating a loop that searches a specific variable

Doeny wrote: Wed Feb 07, 2024 6:31 pm For the first method it gives me an error saying that 'name switch" is not definied
I was relying on code you have shown, and switch was defined there...
by Ocelot
Fri Feb 02, 2024 3:39 am
Forum: Ren'Py Questions and Announcements
Topic: Darken all but part of the screen
Replies: 3
Views: 562

Re: Darken all but part of the screen

So, you want something like that: https://drive.google.com/file/d/1MYJJpKht5VEjm12wqgn1fJQLG4I1TuSP/view?usp=drivesdk In this case I suggest to: 1) Create a completely opaque image the size of your cutout. Crop((0, 0, SIZE_X, SIZE_Y), Solid("#000")) works well for that. 2) Create a complet...
by Ocelot
Thu Feb 01, 2024 3:38 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Creating a loop that searches a specific variable
Replies: 8
Views: 1017

Re: Creating a loop that searches a specific variable

1) If you have a bunch of varaibles with name that differs only by the number on the end, you really want to use a list there. init python: class buttons: def __init__(self, img, place1, place2, place3, place4, place5, place6): self.img = img self.places = [place1, place2, place3, place4, place5, pl...
by Ocelot
Thu Feb 01, 2024 3:22 am
Forum: Ren'Py Questions and Announcements
Topic: Changing speech bubble properties for a specific line of dialog
Replies: 2
Views: 384

Re: Changing speech bubble properties for a specific line of dialog

Properties are chosen within bubble editor (shift+B) and not from a script. They are stored within bubble database (bubble.json by default), so, if you want to edit something manually, you can go there.
by Ocelot
Mon Jan 29, 2024 5:25 am
Forum: Ren'Py Questions and Announcements
Topic: Problems with chapter select
Replies: 7
Views: 801

Re: Problems with chapter select

In your case using persistent data seems acceptable. Just make sure that there are no intermediate dependencies that will set your game in strange states, like in black hearts example. Normally you could not get this by playing the game, only by some clever replaying of earlier chaptesr. Or actually...
by Ocelot
Sun Jan 28, 2024 2:43 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Problems with screen input
Replies: 4
Views: 665

Re: Problems with screen input

I made a quick example: init python: class ConsoleInput(InputValue): def __init__(self, log=None, actions={}): self.text = "" self.log = log self.actions = actions def get_text(self): return self.text def set_text(self, text): self.text = text def enter(self): if self.log is not None: self...
by Ocelot
Sun Jan 28, 2024 4:31 am
Forum: Ren'Py Questions and Announcements
Topic: Problems with chapter select
Replies: 7
Views: 801

Re: Problems with chapter select [still need help]

I didn't read all that, since it looks like a pretty complex system and I prefer not to debug complex systems bt looking at partial code snippets from random places, but I noticed that you are trying to avoid persistent data as if it was goto . As long as you understand how persistent data works and...
by Ocelot
Sun Jan 28, 2024 3:55 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Problems with screen input
Replies: 4
Views: 665

Re: Problems with screen input

What do you mean by "When mouse1 is clicked, the input text also returns"? How do you determine that it is a return, because in your code I see nothing that can even return at all? Could it be a simple screen refresh that recreates your input value and you think that text disappearing is a...