Search found 11 matches

by Hadriex
Sun Feb 18, 2024 11:16 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

Just wanted to say, thank you very much for taking the time to help me out. I really do appreciate it m_from_space.
by Hadriex
Thu Feb 15, 2024 4:35 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

I'm still tweaking the code, making sure everything is working and ran into an unexpected problem with the random generation. The results are random, but only once per launch of the game. I had hoped simply calling the label would reroll everything, but it gives the same results each time. I even tr...
by Hadriex
Tue Feb 13, 2024 12:19 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

Oh. The link was to a thing on scope and it said that the variable would reset to it's original value at arbitrary times, or something like that. Maybe I misread it. My workaround had just been to increment the variable in the label that was called. I figured, eh, probably for the best, the label ch...
by Hadriex
Sun Feb 11, 2024 8:52 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

I finally had time to work on it again, and am baffled. The if/then statement isn't working. I have the call for this screen in a loop and, well, here the relevant bit of code. I've been fiddling with it for awhile trying to simplify and isolate the problem. --- default potion_idx = renpy.random.ran...
by Hadriex
Thu Feb 08, 2024 11:31 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

Ah I'm not familiar with vboxes. I see them a lot in renpy code samples but things seem to work without them so I wasn't sure what they did exactly. I'll try that. I'm wracking my brain to think if there's anything else the shop might need that I haven't asked about but I'm coming up blank. I think ...
by Hadriex
Thu Feb 08, 2024 4:53 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

This is excellent it worked almost perfectly. I had to remove the line 'vbox:' I'm not entirely sure what a vbox is but it was pushing all the images into a vertical stack, once I removed that line and added xalign and yalign to the image buttons, and the logic to display tooltips, everything became...
by Hadriex
Wed Feb 07, 2024 5:56 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

Oh no worries, you're helping immensely. My stubborness is my own problem not yours. I think I understand how to use the random shuffle now. I'm a little stuck on is how to put the image buttons into a list. I like how slick this line you wrote is: default shelfspaces = [(0, 10), (120, 50), (200, 10...
by Hadriex
Tue Feb 06, 2024 11:38 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

So I set to work, step one plug in the code and make sure it works, and then step 2 will be to modify the code to work with image butto... Aw crap. It's not working in step one? ...All right, let's try the simpler code from the first box... It must have something to do with the code I already wrote....
by Hadriex
Mon Feb 05, 2024 3:36 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

Re: How do I make a shelf, with multiple random items, each an image button?

Thank you very much, I'll get to work with this tomorrow and see what I can do with it :)
by Hadriex
Mon Feb 05, 2024 12:34 am
Forum: Ren'Py Questions and Announcements
Topic: How do I make a shelf, with multiple random items, each an image button?
Replies: 17
Views: 1624

How do I make a shelf, with multiple random items, each an image button?

So I've been working on a game, figuring out the code, and I finally hit a wall. Specifically with image buttons. I need some help on how to make multiple imagebuttons that are randomized and disappear when interacted with. I should probably explain what I'm going for here. What I want: A shop where...