Hi There,
I’m struggling with getting a childactor to have AI with it. What happens is, Spawn Dog
spawns from a random integer onto a Spawn Enemy (arrow) I set in mastertiles
. And then it determines if it should spawn the dog ( childactor
) if player pawn is within 20000 vector length. If it is, then spawn AI Enemy Dog and its controller. However that doesn’t work. Only thing that works is Child Actor Component
. But then there is no AI Controller assigned to it. So I’m a bit stuck as to what to do?
Hi you could spawn an Ai from class or set the default ai controller of the actor (under class defaults) and drag of the spawn actor pin and use “Spawn Default Controller” which can be an AI controller.
Hope that helps.
to help better clarify the issue. I’m calling spawn enemy
arrow from inside mastertiles
which is an static actor. It spawns everything from a construction script.
did some more debugging, and ended up getting it working (partially). I took out the spawn dog function and put it inside my game mode. Now it spawns just fine after I call the spawn enemy
arrow.