Search found 3 matches

by bluestarziro
Thu Sep 05, 2019 9:44 pm
Forum: Ren'Py Questions and Announcements
Topic: What is [i] used for?
Replies: 3
Views: 616

Re: What is [i] used for?

Ah, that clicked. So that means the 'i' in the code I posted is representing all of the items in the 'inventory' during the 'for' loop. So in this part of the code: sum(i.item.weight * i.amount for i in self.inventory) 'i' contains the total 'amount' and 'weight' of all the items in the inventory. S...
by bluestarziro
Thu Sep 05, 2019 8:25 pm
Forum: Ren'Py Questions and Announcements
Topic: What is [i] used for?
Replies: 3
Views: 616

What is [i] used for?

I've been seeing this in code all over the place. What is it? how do I use it? What is the secret behind this mysterious power? Joking aside, here what I'm talking about: def add_item(self, item, amount=1): if item.weight * amount > self.weight_max - sum(i.item.weight * i.amount for i in self.invent...
by bluestarziro
Thu Sep 05, 2019 8:16 pm
Forum: Welcome!
Topic: Guestbook
Replies: 5533
Views: 2683356

Re: Guestbook

Hey everyone. Just call me me Blue for now.

I had an account 2-3 years ago, but my email got broken into, so I just ditched it.
Anyway, nice to see you all again.

I'm mostly back so I can get better at coding.
My exp w/ coding is between beginner and only slightly terrible :)
*cheers*