I have a main character in my game. then i spawn another character “character2” while playing game using “SpawnActor Character2” node.
i want this new character2 to do some AI work. i figured how to make him follow target points via “level blueprint”. but it is only working if i manually put that character2 in scene before starting the game.
But what i want is… start my game > spawn character2 > then let him do his AI work.
But how can i get a reference of newly spawned character in my “Level Blueprint”??
and if it is possible… to get dynamic reference of spawned pawn. will it work if i spawn more of them. assuming they all are doing same work??
on the other hand if its possible to program it on its own blueprint (character2BP)? is there any easy way… similar to level blueprint??
If you have some Character specific behavior, you should put it in it’s own blueprint
If you open your “character2BP”, try to put the same logic in there than the one you had in your level blueprint.
That way whenever you spawn a new one, it’ll execute its own logic and you will be able to spawn as many as you would like.
to open his blueprint, just double click it in the content browser , if it’s a data only BP you’ll have a message on top saying “NOTE : This is a data only blueprint, so only the defaults values are shown. It does not have any script or variables. If you want to add some, “Open Full Blueprint Editor””
Just click that and you’ll have access to your even graph where you should put all the logic.
its okay i’m learning AI behavior tree stuff now… its not that hard as i though…
I’m going to create AI character using that… not using “level Blueprint” anymore