Search found 1924 matches

by philat
Sun May 05, 2024 3:16 am
Forum: Ren'Py Questions and Announcements
Topic: Problems with translation in image composite Text
Replies: 3
Views: 150

Re: Problems with translation in image composite Text

I'm unable to reproduce this. If you throw this into an empty project and run it (latest stable version), it works. (I chose pig latin because that will auto generate translations, but you can do it with any language.) image test_composite = Composite( (300, 300), (0, 0), Solid("#FFF9", xy...
by philat
Sat May 04, 2024 1:34 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Showing a screen behind sprites ?
Replies: 4
Views: 243

Re: Showing a screen behind sprites ?

Well, I don't have your images and don't know what you're seeing, so keep in mind that this is difficult to answer, but: - check whether there isn't any default background being shown (clear the master layer with an empty scene statement) - the syntax is either show screen forest_glade_1 onlayer but...
by philat
Thu May 02, 2024 8:38 pm
Forum: Ren'Py Questions and Announcements
Topic: Unable to add name function to renpy.random.choice
Replies: 1
Views: 143

Re: Unable to add name function to renpy.random.choice

While it is unclear what your actual problem is, I assume it's double interpolation. The simplest way to make this work is probably to use renpy.say ( $ renpy.say(e, random_dialogue) ) instead of a standard say statement (e "[random_dialogue]").
by philat
Tue Apr 30, 2024 12:01 am
Forum: Ren'Py Questions and Announcements
Topic: Custom GUI - Button and slider alignment/positioning
Replies: 5
Views: 191

Re: Custom GUI - Button and slider alignment/positioning

Hard to say without either your assets or your code, but in general try looking into align properties (https://www.renpy.org/doc/html/style_properties.html#style-property-yalign) or gutter properties (https://www.renpy.org/doc/html/style_properties.html#style-property-top_gutter). In the case of the...
by philat
Mon Apr 29, 2024 11:55 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 10
Views: 284

Re: Making an imagebutton move from within python function

My bad, that should be a repeating timer.

Code: Select all

screen repeating_function():
    default counter = 0
    timer 0.5 repeat True action If(counter < len(path), [Function(move_testcar, counter), IncrementScreenVariable("counter")], Hide()) 
by philat
Mon Apr 29, 2024 8:05 am
Forum: Ren'Py Questions and Announcements
Topic: Defining Drag as displayable
Replies: 4
Views: 196

Re: Defining Drag as displayable

*shrug* tbh not sure, I don't tend to use Drags() much. That said, I haven't really found any reason to need Drags(), since you can always build the drags programmatically if you need to get data from elsewhere. For example: init python: def rice_dragged(drags, drop): print("rice") def egg...
by philat
Mon Apr 29, 2024 3:41 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 10
Views: 284

Re: Making an imagebutton move from within python function

Ah, yes, I had skimmed the part of the OP that said that. Well, the principle remains the same, I guess, just adjusted to move one "step" at a time and wait before moving to the next step. I would probably use a timer to repeatedly call the function on a small delay. screen repeating_funct...
by philat
Mon Apr 29, 2024 12:39 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Need help for name choice
Replies: 2
Views: 154

Re: Need help for name choice

Use either of the following if checks:

Code: Select all

if Name == "A" or Name == "B" or ... :

if Name in ["A", "B" ... ]:
by philat
Mon Apr 29, 2024 12:35 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 10
Views: 284

Re: Making an imagebutton move from within python function

While you CAN use a CDD for finer control, you also don't need it for simple linear movement. (Sidenote: I don't understand how your move_testcar function is supposed to work in the context of the game, but I assume that's due to it being edited for posting here.) init python: def move_testcar(): gl...
by philat
Sun Apr 28, 2024 10:34 pm
Forum: Ren'Py Questions and Announcements
Topic: Defining Drag as displayable
Replies: 4
Views: 196

Re: Defining Drag as displayable

The following mostly seems to work. For reference, supplying transforms to a drag using at is not supported even when using screen drags (not Drag()s). Other attributes (like dragged, draggable, etc.) should probably be given in the Drag() definition and not added to the screen directly. screen drag...
by philat
Sun Apr 28, 2024 11:00 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] get click position on the button?
Replies: 5
Views: 163

Re: get click position on the button?

Wouldn't renpy.focus_coordinates (https://www.renpy.org/doc/html/other.ht ... oordinates ) be enough to get the info you need?
by philat
Thu Apr 25, 2024 1:34 am
Forum: Ren'Py Questions and Announcements
Topic: Should I be using imagemaps or imagebutton for an interactive flowchart (zooming, mouse navigation, etc)
Replies: 4
Views: 285

Re: Should I be using imagemaps or imagebutton for an interactive flowchart (zooming, mouse navigation, etc)

Note that I am not particularly offering advice on how to best approach this, because that's a complicated question that I am ill equipped to deal with without your assets or your design goals. Simply to answer your specific question: the way you do it now the hotspots would be in a different place,...
by philat
Thu Apr 25, 2024 1:04 am
Forum: Ren'Py Questions and Announcements
Topic: Vbox in screen seems to... move around? [SOLVED!]
Replies: 2
Views: 158

Re: Vbox in screen seems to... move around?

If box size is not specified, a box is only as large as it needs to be - i.e., the size of the largest child. While there are many ways to approach organizing your screen, the path of least change for now is probably to specify the xsize of your vbox.
by philat
Tue Apr 23, 2024 12:03 am
Forum: Ren'Py Questions and Announcements
Topic: Using imagemaps to create a flowchart, hotspots not working
Replies: 2
Views: 247

Re: Using imagemaps to create a flowchart, hotspots not working

A hotspot needs an action to be hoverable (use NullAction() as a placeholder if need be). You also wouldn't be able to see whether your hotspot is since your idle and hover images are the same. imagemap: ground "flowchart_repaired_no_true" idle Solid("#FF09", xysize=(config.scree...