I NEED HELP PLEASE.
I have multiple instances for one object. I'd like to not have to repeat the statement that is pointed out in the picture over and over for each instance. But i need each instance separately to contribute to the money global variable. I've tried using "foreach" but it only has one instance contributing +1 to money. this is the only way ive found to have multiple instances separately contributing a +1 to money. Is there any way to condense this down to one statement.
Thank you for your help!!!