Search found 1882 matches

by Ocelot
Mon Oct 31, 2022 3:51 pm
Forum: Ren'Py Questions and Announcements
Topic: Ran into a problem using custom warpers in Ren'Py 8.0.3
Replies: 1
Views: 29

Re: Ran into a problem using custom warpers in Ren'Py 8.0.3

If you are adding hide clause to your python block where you initialize it, don't. Hide hides any identifier you defined here.
by Ocelot
Mon Oct 31, 2022 3:50 pm
Forum: Ren'Py Questions and Announcements
Topic: Programatically added hotspots on an image map
Replies: 3
Views: 44

Re: Programatically added hotspots on an image map

Cyrrying is basically packaging some of function arguments withing function object, so it could be called with less arguments. I do not see, how this could be used in this case. Technically, you can pass curried function to the C_Negation and classes that are defined similarly to it, as it just expe...
by Ocelot
Mon Oct 31, 2022 2:35 pm
Forum: Ren'Py Questions and Announcements
Topic: Function problem
Replies: 1
Views: 24

Re: Function problem

sakura_eyes = astore.sakura_eyes = a
The rest should be changed similarly.
by Ocelot
Mon Oct 31, 2022 1:58 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] create and delete imagebuttons from python block
Replies: 4
Views: 50

Re: create and delete imagebuttons from python block

Which action do you use? This is usually symptom of having code with side effects in screens.

And I forgot to wrap bacgtound imagebutton and potential piece in fixed in the code I provided.
by Ocelot
Mon Oct 31, 2022 10:49 am
Forum: Ren'Py Questions and Announcements
Topic: Text in screens
Replies: 4
Views: 71

Re: Text in screens

__() should add string in list of transaltable strings. Did you regenerate translation file after adding it? Did you check whole translate strings statement that was generated? Sometimes string you want is hidden between unrelated strings.
by Ocelot
Mon Oct 31, 2022 9:26 am
Forum: Ren'Py Questions and Announcements
Topic: Programatically added hotspots on an image map
Replies: 3
Views: 44

Re: Programatically added hotspots on an image map

A collection of composable function objects? class C_Value: def __init__(self, val): self.val = val def __call__(self): return self.val class C_Variable: def __init__(self, name): self.name = name def __call__(self): return getattr(store, name) class C_Negation: def __init__(self, fo): self.fo = fo ...
by Ocelot
Mon Oct 31, 2022 9:13 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] create and delete imagebuttons from python block
Replies: 4
Views: 50

Re: create and delete imagebuttons from python block

ui functions should not be used. There is a reason why they were deleted from current documentation. What you need is a screen which places imagebuttons depending on some external data. Something like: default pieces = { (0, 5): "img1_%s", (1, 3): "img2_%s" } screen board(): vpgrid: cols 20 rows 16...
by Ocelot
Sun Oct 30, 2022 6:02 pm
Forum: Ren'Py Questions and Announcements
Topic: Text in screens
Replies: 4
Views: 71

Re: Text in screens

Can you show an example of what does not work?

Generally "Mark string as translateable" (_()) and "translate immideately" (__()) are enough if the rest of code is translation-friendly.
by Ocelot
Sun Oct 30, 2022 5:02 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to grab and manipulate renpy elements by their IDs
Replies: 3
Views: 101

Re: how to grab and manipulate renpy elements by their IDs

In short: that would ne useless, since all changes would disappear when screen would reevaluate and redraw itself in the next instant.

You can conditionally create buttons from data contained in some container and your functions would just manipulate those containers.
by Ocelot
Sat Oct 29, 2022 6:14 am
Forum: Ren'Py Questions and Announcements
Topic: Clicked hotspots on transparent images
Replies: 3
Views: 69

Re: Clicked hotspots on transparent images

Yes, that was one of the reasons, why I had to drop imagemaps and transition to imagebuttons. Hope this will be the only issue you encounter.
by Ocelot
Fri Oct 28, 2022 4:40 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] TypeError: iter() returned non-iterator of type 'RevertableList'
Replies: 5
Views: 105

Re: TypeError: iter() returned non-iterator of type 'RevertableList'

A question: which RenPy version do you use? Pyhon 2 and 3 define iterators differently.
by Ocelot
Tue Oct 25, 2022 4:03 pm
Forum: Ren'Py Questions and Announcements
Topic: Making a hotspot on a background calling for a menu
Replies: 4
Views: 103

Re: Making a hotspot on a background calling for a menu

As I said, you probably want to use call screen , and, after looking at your code, I can say, that you definetly want to use call screen here. show screen works as generic show statement: it displays the screen and lets script progress further. Then you hit menu statement, it displays in a modal scr...
by Ocelot
Tue Oct 25, 2022 7:57 am
Forum: Ren'Py Questions and Announcements
Topic: Making a hotspot on a background calling for a menu
Replies: 4
Views: 103

Re: Making a hotspot on a background calling for a menu

1.) Screens are not part of the game control flow and should not be placed within labels to avoid confusion. 1a.) You should euther show screen try1 or call screen try1 (probably later) in your script depending on your needs. 2.) ShowMenu is for displaying screens in menu context. Not for anything e...
by Ocelot
Tue Oct 25, 2022 4:11 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Why doesn't "drag_raise" work when using a loop?
Replies: 2
Views: 84

Re: Why doesn't "drag_raise" work when using a loop?

In your firs piece of code you are creating a unique draggroup for each drag. drag_raise only works for entities in the same draggroup.
by Ocelot
Tue Oct 25, 2022 4:07 am
Forum: Ren'Py Questions and Announcements
Topic: Conditional Menu Options?
Replies: 5
Views: 125

Re: Conditional Menu Options?

What is the value of about_melanie when menu is first reached? To be precise, where is the code which sets that value? You have to set variable to something, before you check it.