|
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;
(comments are locked)
|
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.
(comments are locked)
|
