I have 7 separate objects on my scene with tag "Enemy" and what i want to do now is to change value "RaceBeginner" from false to true in script called "EnemyShipAI" on every object with tag "Enemy".
I found something like this but i have no idea how to use it to change those values:
GameObject.FindGameObjectsWithTag("EnemyAI").GetComponent("EnemyShipAI").RaceBeginnerEnemy = true;
asked Dec 29 '11 at 03:19 PM
It's bad practice to use quotes with GetComponent. Also it would be easier if you follow the convention of using lowercase for variable names and uppercase for class and function names.
answered Dec 29 '11 at 03:34 PM