Search found 58 matches

by Chekhov
Mon Apr 08, 2019 6:14 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to use ScreenVariableValue to pass a value back?
Replies: 10
Views: 192

Re: How to use ScreenVariableValue to pass a value back?

Right, I almost forgot about my second question. Your solution would work, but I don't know how I can trigger it in real time, rather than once you click a button. It will update in real time if you put the condition in the screen. Again, this is clumsy, but it (mostly) works. Perhaps someone could...
by Chekhov
Mon Apr 01, 2019 2:03 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to use ScreenVariableValue to pass a value back?
Replies: 10
Views: 192

Re: How to use ScreenVariableValue to pass a value back?

Right, I almost forgot about my second question.

Your solution would work, but I don't know how I can trigger it in real time, rather than once you click a button.
by Chekhov
Mon Apr 01, 2019 10:54 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to use ScreenVariableValue to pass a value back?
Replies: 10
Views: 192

Re: How to use ScreenVariableValue to pass a value back?

You have two different things with the same name. A storage object "allocation" and a screen "allocation"--don't have two different things with the same name. You should be declaring your variables with default or define outside of blocks, so: default allocation = Storage() You also shouldn't need ...
by Chekhov
Mon Apr 01, 2019 10:49 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to use ScreenVariableValue to pass a value back?
Replies: 10
Views: 192

Re: How to use ScreenVariableValue to pass a value back?

Maybe using FieldValue instead of ScreenVariableValue? Yes, this works perfectly, thank you. Working results below for anyone who hits on this from a search: text "Sawyer: " + str(allocation.sawyer) bar value FieldValue(allocation, "sawyer", colony.population, False, style = "bar")
by Chekhov
Mon Apr 01, 2019 10:37 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to use ScreenVariableValue to pass a value back?
Replies: 10
Views: 192

Re: How to use ScreenVariableValue to pass a value back?

Matalla wrote:
Mon Apr 01, 2019 10:03 am
- Besides, if these 2 variables are indeed the same, why not use allocation.sawyer directly in the bar and get rid of the temp_sawyer?
Because it throws an error saying that allocation.sawyer is not declared inside the screen.
by Chekhov
Mon Apr 01, 2019 9:05 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to use ScreenVariableValue to pass a value back?
Replies: 10
Views: 192

[Solved] How to use ScreenVariableValue to pass a value back?

Perhaps I'm trying to do this in a way I shouldn't. The core functionality of what I'm trying to build is the following: 1. You have a population of people 2. You can allocate that population to different jobs I've decided to do this with bars that you can drag, while showing the number above it, as...
by Chekhov
Sun Mar 31, 2019 3:24 pm
Forum: Ren'Py Questions and Announcements
Topic: Keeping track of 'seen' text. [Solved]
Replies: 1
Views: 75

Re: Keeping track of 'seen' text.

renpy.seen_label or renpy.seen_image work for that.
by Chekhov
Sun Mar 31, 2019 2:28 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Saving games, classes, and constants. How to use init in the right way?
Replies: 6
Views: 161

Re: Saving games, classes, and constants. How to use init in the right way?

trooper6 wrote:
Sat Mar 30, 2019 3:52 pm
1) All variables should be initialized outside of any block using either default if that variable might change, or define if it won't. This will fix the problem you are asking about.
I had been wondering what define was for, I guess this solves it, thanks.
by Chekhov
Sun Mar 31, 2019 2:27 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Saving games, classes, and constants. How to use init in the right way?
Replies: 6
Views: 161

Re: Saving games, classes, and constants. How to use init in the right way?

What's the problem with number 1? The code you've provided should work. Because I independantly need the hair_color_list. But since it's been set in a init block, if you load the game, it will be gone/empty. Btw, renpy has its own random functions, for example "renpy.random.choice()". Better if you...
by Chekhov
Sat Mar 30, 2019 11:50 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Text pauses not working during voice play after update?
Replies: 7
Views: 164

Re: Text pauses no longer working during voice play upon update?

I just tested it out and it works exactly the same for me; it waits far longer when the voice is still going (I used a 10 min file, so I presume it would have continued). When I remove the voice line, it waits only half a second. My first instinct is that it's a bug in renpy, but I don't have enough...
by Chekhov
Sat Mar 30, 2019 11:10 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How can I add one more variable here?
Replies: 2
Views: 102

Re: How can I add one more variable here?

if hour in [5, 6, 7, 8, 9, 10, 11]: if month == bmonth and day == bday: show image "birthdaybg" with fade else: show image "morningbg" with fade show screen morning I think the pieces you have work fine, structured like this. I'm assuming this is what you're intending to do; between the hours of 5-...
by Chekhov
Sat Mar 30, 2019 9:40 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How do I animate the "background" on the main menu?
Replies: 2
Views: 90

Re: How do I animate the "background" on the main menu?

Not sure why I spent so long on this.... all I had to is put it between quotes. I had come so close at one point!

Thanks Irina.
by Chekhov
Sat Mar 30, 2019 8:58 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Text pauses not working during voice play after update?
Replies: 7
Views: 164

Re: Text pausing during voice play?

I'm not sure about the tag you're describing. The modern usage of voice acting is here: https://www.renpy.org/doc/html/voice.html

Do you use similar code or different?
by Chekhov
Sat Mar 30, 2019 8:14 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] (workaround) How to play a sound on "notify" ?
Replies: 3
Views: 85

Re: How to play a sound on "notify" ?

It may be dirty, but it is like manna from the sky. Thank you, Matalla. I was spending way too much time on this.
by Chekhov
Sat Mar 30, 2019 7:42 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Saving games, classes, and constants. How to use init in the right way?
Replies: 6
Views: 161

[Solved] Saving games, classes, and constants. How to use init in the right way?

Here is a bit of a mystery to me. I think I'm structuring things incorrectly, but I'm not sure in what way. I'll make a simplified version of what I'm dealing with. init python: hair_color_list = ["blonde", "brown", "black"] class Girl(object): def __init__(self): self.hair = random.choice(hair_colo...