Can't access variables with classes



image

I want the tiers class to be able to access the foods class variables. The specific variables i want to access is CurrentProp and CurrentPropSelected.

For context, I’m trying to make a tier list. The player will shoot the first item and then shoot the second item to place the said item into the tier list board.

The function MoveProp() is going to get the CurrentProp and get the CurrentPropSelected. But for some reason, the if(CurrentPropSelected?) line is not passing, thus the other code in that function is not working as well.

I tried getters and setters, but those didn’t work either. I tried putting the variables in the game_manager_device class, but that didn’t work either.

I’m guessing the problem is how I’m accessing the variables or maybe I don’t understand the scope of it all.

If you have any advice or know what’s going on, any help would be appreciated!
Been working at this for a while. Thanks for reading. :slight_smile: :melting_face: