Search found 12 matches

by jwideman
Sat Jun 20, 2020 6:43 pm
Forum: Ren'Py Questions and Announcements
Topic: Value in list not changing in loop
Replies: 2
Views: 239

Re: Value in list not changing in loop

Even though my label has a return line? Okay, so renpy.call() is poorly named. Alrighty then. Thanks.
by jwideman
Sat Jun 20, 2020 4:08 pm
Forum: Ren'Py Questions and Announcements
Topic: Value in list not changing in loop
Replies: 2
Views: 239

Value in list not changing in loop

First of all, I really wish renpy had better debugging tools. This has been kicking my ass for 3 days and I'm still struggling to figure out where my code is failing. Anyway... class Events(renpy.store.object): def __init__(self): self.eventlist = [] def get(self): return self.eventlist def add(self...
by jwideman
Wed Jun 17, 2020 5:18 pm
Forum: Ren'Py Questions and Announcements
Topic: Passing a class object as an argument
Replies: 4
Views: 212

Re: Passing a class object as an argument

I spoke too soon. It only works about half the time. The code only works as expected about half the time per launching the game. That is, I launch the game, the imagebutton shows up where it's supposed to, I exit the game. I launch the game again, and this time the imagebutton does show up. However,...
by jwideman
Wed Jun 17, 2020 5:07 pm
Forum: Ren'Py Questions and Announcements
Topic: Passing a class object as an argument
Replies: 4
Views: 212

Re: Passing a class object as an argument

Whoops. I left out the advance_time code. It's really just to demonstrate that the .remove method works of course. label advance_time: #scene black with fade call event_loop python: time_of_day += 1 if time_of_day == 4: time_of_day = 0 day += 1 for item in itemlist.get(): if item.name == "mc_bedroom...
by jwideman
Wed Jun 17, 2020 4:41 pm
Forum: Ren'Py Questions and Announcements
Topic: Passing a class object as an argument
Replies: 4
Views: 212

Re: Passing a class object as an argument

No idea. The Item() wasn't getting added to the stack like I expected, but now it is. I have second problem though: Since I can't remove an object from the stack without a reload resetting it, I set a flag: def remove(self,x): self.eventlist.remove(x) x.disabled = True self.eventlist.add(x) This wor...
by jwideman
Tue Jun 16, 2020 11:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Passing a class object as an argument
Replies: 4
Views: 212

Passing a class object as an argument

This is tricky for me to explain, so here's the relevant code: default itemlist = Items() default eventlist = Events() init -1 python: class Items(renpy.store.object): def __init__(self): self.itemlist = set() def get(self): return self.itemlist def add(self,x): for i in self.itemlist: if i.name == ...
by jwideman
Mon Oct 07, 2019 6:07 pm
Forum: Ren'Py Questions and Announcements
Topic: Window show does nothing
Replies: 6
Views: 389

Re: Window show does nothing

rayminator wrote:
Mon Oct 07, 2019 5:26 pm
have you tried this out
viewtopic.php?t=41776#p438420
All that did was make the text fade in, which isn't even remotely what I wanted. The unwanted textbox background still pops up, and the wanted dialogue disappears, during transitions.
by jwideman
Mon Oct 07, 2019 5:48 pm
Forum: Ren'Py Questions and Announcements
Topic: Window show does nothing
Replies: 6
Views: 389

Re: Window show does no nothing

Imperf3kt wrote:
Mon Oct 07, 2019 4:55 pm
I believe what you want is window hide
That also did nothing at all. Not even "did something else that wasn't quite right," but didn't change anything.
by jwideman
Mon Oct 07, 2019 4:11 pm
Forum: Ren'Py Questions and Announcements
Topic: Window show does nothing
Replies: 6
Views: 389

Window show does nothing

This was asked before, but without a satisfactory ending. I've tested it with just the relevant lines - show image, say dialogue, show image with dissolve, window show, say dialouge - dialogue disappears during transition. I've tested it in a fresh project with just those lines and it still fails to...
by jwideman
Fri Aug 30, 2019 11:08 am
Forum: Ren'Py Questions and Announcements
Topic: Viewports: edgescroll and ui.adjustment() workaround?
Replies: 4
Views: 434

Re: Viewports: edgescroll and ui.adjustment() workaround?

Mostly working. Only things I had to fix were it's kwargs['side'] not kwargs.['side'], and it uses the size of the screen (1280) not the size of of the background image (2560).
Thanks!
by jwideman
Thu Aug 29, 2019 7:53 pm
Forum: Ren'Py Questions and Announcements
Topic: Viewports: edgescroll and ui.adjustment() workaround?
Replies: 4
Views: 434

Re: Viewports: edgescroll and ui.adjustment() workaround?

I thought it should be obvious from the code. Okay, a visual aid then: https://cdn3.imggmi.com/uploads/2019/8/30/2ce50d68ab04bc85fa22ece6e8ef7cda-full.png This is resized for the forum, but it's 3200 pixels wide. The areas in red are off the screen. That's the middle of the viewport. Those gradients...
by jwideman
Thu Aug 29, 2019 3:54 pm
Forum: Ren'Py Questions and Announcements
Topic: Viewports: edgescroll and ui.adjustment() workaround?
Replies: 4
Views: 434

Viewports: edgescroll and ui.adjustment() workaround?

The background image is wider than the window and I want the images (gradient left/right) to only show when the viewport is in the middle. What's the workaround for this? I've tried XScrollValue(), but that returns a bar value. screen scr_street_hmc(): modal True default xadj = ui.adjustment() viewp...