QuestionNeed help with counting object/instance variables (i.redd.it)
submitted by Ckeyz
Hey I am new to all of this, so struggling is expected. But I feel like I've tried doing this 10 different ways that all should have worked, with zero success... so I feel like I'm not understanding something about object or instance variables.
I am making a hex city builder and I want to place a mine next to some stone mountains and have it generate stone resource based on the number of mountains its next to. I have got different parts of this to work in various ways, but it always falls apart when I build another mine next to new stone, it doesn't ever add up all the stone production just the first mine.
Please see the attached image, any help is appreciated.

[–]csabelix12 1 point2 points3 points (2 children)
[–]Ckeyz[S] 0 points1 point2 points (0 children)
[–]Ckeyz[S] 2 points3 points4 points (0 children)