So I’m working on this Bullet hell SHMUP game.
I have a mini-boss type enemy(UFO) that has an elaborate bullet set up, but the ai script on the parent references its children by name to shoot. …Which means that if I have more than one UFO in a scene, only one ufo does everything it needs to, and the other one just sits there.
I believe that is because the ai references scripts by GameObject names.
Is there a way I can get a object reference using a child-type command?
AKA is there a script that allows me to do this kind of stuff?
The Ai is on the parent with 2 children. 1 of the 2 children has 5 more children.
The command would allow the parent script to access the child with grandchildren.
then, it would go furthur into the grandchildren and get access to the scripts on them.
I would appreciate all help!
An Early Thanks!