Search found 303 matches

by m_from_space
Wed Dec 07, 2022 4:28 am
Forum: Ren'Py Questions and Announcements
Topic: Drawing a line on a screen
Replies: 6
Views: 130

Re: Drawing a line on a screen

It works fantastic! Thank you so much. That made even for an OOI (object-oriented idiot) like me everything usable. I still don't get what the Python code is actually doing, but who cares as long as it does what it should. :D The python code creates a class for a user-defined Displayable (a Renpy s...
by m_from_space
Mon Sep 05, 2022 2:42 am
Forum: Ren'Py Questions and Announcements
Topic: Running a function from within dialogue
Replies: 3
Views: 321

Re: Running a function from within dialogue

It's really simple:

Code: Select all

$ w = a_or_an(unknown_string)
e "It's [w] [unknown_string]."
On the other hand your function could return the combination of "a" or "an" and the word.
by m_from_space
Thu Sep 01, 2022 2:27 pm
Forum: Ren'Py Questions and Announcements
Topic: Returning to Screen from Called Label
Replies: 4
Views: 282

Re: Returning to Screen from Called Label

MrRogerSmith wrote:
Thu Sep 01, 2022 1:59 am

Code: Select all

            else:
                image "lock1"
                pass
Unrelated to your question I suggest doing:

Code: Select all

            else:
                add "lock1"
by m_from_space
Fri Aug 26, 2022 3:01 pm
Forum: Ren'Py Questions and Announcements
Topic: Is there a way to make changes to the game without reloading?
Replies: 2
Views: 332

Re: Is there a way to make changes to the game without reloading?

No, I don't think so. You might want to change as much as you can handle in your head, before reloading then. I mean it's clear that a game has to reload for code-changes to take effect. On the other hand, maybe you could import the necessary "design" parts of that code into your own project, fix it...
by m_from_space
Fri Aug 26, 2022 2:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Concatenate string and variable within menu choice
Replies: 4
Views: 341

Re: Concatenate string and variable within menu choice

In python it's always useful to use the function format() to connect things to form a string. But in this case you have to do it the following way:

Code: Select all

$ val = Ava_stats.a*0.4+Ava_stats.b*0.1
menu:
    "Test text ([val] % chance of +1)":
        pass
by m_from_space
Fri Aug 26, 2022 12:03 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved] multiple of the same item in inventory giving problems
Replies: 6
Views: 317

Re: multiple of the same item in inventory giving problems

I didn't test anything, but just found a typo in your code: class Equipable(InvItem): def __init__(self, name, cost, img): InvItem.__init__(self, name, cost, img) def equip(self, target): self.is_equipped = True self.equipped_to = target def unequip(self, target): self.is_equipper = False <------ TY...
by m_from_space
Thu Aug 25, 2022 2:50 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved] trigger vpunch and hpunch from python?
Replies: 15
Views: 698

Re: trigger vpunch and hpunch from python?

Kia wrote:
Thu Aug 25, 2022 6:28 am
the screen that calls the function.
Don't call the screen, but show it. You can hide it whenever you want anyway. Everything works fine this way.

Code: Select all

label start:
    show screen vpunch_test
by m_from_space
Thu Aug 25, 2022 4:48 am
Forum: Ren'Py Questions and Announcements
Topic: Action If and if statement
Replies: 2
Views: 322

Re: Action If and if statement

First method:
- timer is called every 0.1 seconds, even if x is not True

Second method:
- timer is called every 0.1 seconds, only after x is True

Second method is preferable.

By the way, you don't have to include "None" inside the If() function, the False statement is None by default.
by m_from_space
Thu Aug 25, 2022 4:42 am
Forum: Ren'Py Questions and Announcements
Topic: Problems with variables on map screen
Replies: 1
Views: 329

Re: Problems with variables on map screen

Please embed your code into [ code ]...[ /code ] tags first (without the spaces). It's too annoying to read it this way.
by m_from_space
Thu Aug 25, 2022 4:38 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] trigger vpunch and hpunch from python?
Replies: 15
Views: 698

Re: trigger vpunch and hpunch from python?

I've finally got time to try this issue again. Thank you m_from_space, it does work, but the issue of hiding the screen for the duration of the punch remains. I think I'll suggest this one as an additional feature that can be added. What screen is hiding during the vpunch? Nothing is hiding on my e...
by m_from_space
Wed Aug 24, 2022 4:32 am
Forum: Ren'Py Questions and Announcements
Topic: How to change main menu screen according to system time?
Replies: 8
Views: 427

Re: How to change main menu screen according to system time?

Note that the above won't reflect changes until the player restarts the game and the time is checked at runtime. There is a way to make it check in real time, but I don't remember the method currently. I checked it, and the solution provided by anne O'nymous changes the image in real-time. Well, it...
by m_from_space
Wed Aug 24, 2022 3:20 am
Forum: Ren'Py Questions and Announcements
Topic: with transition ending ATL transition early
Replies: 2
Views: 301

Re: ATL custom transition timing

Not having an answer for the problem, other than not using the dissolve like this. On the other hand, I found that you should change your radius/blur value to integer, not float. Float creates a strange flickering effect on my end when the transition finishes. Also your duration time doesn't add up ...
by m_from_space
Wed Aug 24, 2022 2:41 am
Forum: Ren'Py Questions and Announcements
Topic: Using Emphasize Audio Channels boosts other SFX channels
Replies: 2
Views: 316

Re: Using Emphasize Audio Channels boosts other SFX channels

I never used this feature, but the documentation states: - Emphasizing audio refers to a list of channels - so I guess it's not about the mixer - When one of those listed channels is played, all other non-listed channels are reduced to config.emphasize_audio_volume (in your case 0.5) - When none of ...
by m_from_space
Tue Aug 23, 2022 10:29 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Inconsistent centering, but only for the first line?
Replies: 10
Views: 332

Re: Inconsistent centering, but only for the first line?

Would I not still have to find some way to center the text in that case? I'm not sure why using it is bad form in this instance? Whenever you are intending to show something to the player multiple times in the same format and it's not dialogue , screens are the way to go. You then can easily call t...
by m_from_space
Tue Aug 23, 2022 10:24 am
Forum: Ren'Py Questions and Announcements
Topic: Tinyfiledialogs what is it?
Replies: 2
Views: 307

Re: Tinyfiledialogs what is it?

"This is a library that's intended to be used to provide os-native file picking services to the launcher, to replace the various libraries that are used now."