I'm trying to wrap my head around instance variables.
I have ten instances of an object. Each of the instances have a unique instance variable. I would like to compare the value of the instance object overlapped by the player to a global variable.
How do I capture "this", or in other words how can I set it up so that the instance variable being compared is the one being overlapped?
Here's what I tried:
player Is overlapping myInstance
and myInstance.myInstanceVariable > globalVariable -->do stuff
In a nutshell:
How can I compare the instance variable value of the instance currently overlapped by the player?