How to destroy an AI controlled character by pressing a key?
I'm using a ThirdPerson template. I've imported a character from FUSE and assigned the mesh to the ThirdPersonCharacter BP. It is controlled by an AI controller BP which I've set with a "MoveToLocation" node. In addition, I would like the character to be destroyed when I press a key by using a "DestroyActor" node, so I've put the node in the ThirdPersonCharacter BP. The problem is that if I set the "Auto Possess Player" setting to "Disabled", the character execute the Move to Location, but won't be destroyed; On the contrary, if I set it to "Player 0" the character will be destroyed when I press the key, but won't move to location. Any suggestion? Thank you.
asked Nov 21 '18 at 03:05 PM in Blueprint Scripting
your issue here is that the move to is for a ai controller and when you auto posses you are possessing the character with a player controller. if your trying to have this character as an enemy and destroy it from your character then you should get a reference to the enemy in the player character and do the destruction from there. then again it looks from your picture that you are working in two different event graphs so its hard to tell what your trying to accomplish
answered Nov 21 '18 at 03:16 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here