Makkeonmies
Member
Hi! Long story short. My strategy game has multiple 'unit' objects stored under 3 parents: player1_par, player2_par, and cpu_par. The parents are all supposed to attack one another, so that player1_par's children objects attack player2_par and cpu_par, and so on. I can store both the player parents under a common grandparent object, but can't store the cpu_par under the same parent with either of the player parents; it gets messy quick with these parents. So can I assign a variable to store both parents under it, f.ex.
var enemy=player1_par, cpu_par
Or something of the sort?
So whenever an object refers to that variable, f.ex. if distance_to_object(enemy) , then it will automatically refer to all objects stored under the variable name?
var enemy=player1_par, cpu_par
Or something of the sort?
So whenever an object refers to that variable, f.ex. if distance_to_object(enemy) , then it will automatically refer to all objects stored under the variable name?