I’m building a little project, but I’ve managed to get myself abit stuck - I’m sure the answer is pretty simple, I’m just abit new to the engine still. Basically, I have built a game of patrolling AI, and once they find the player they chase him, take away health and eventually kill him. This bit is all working fine, but my issue is with killing the AI.
I’ve set a hitbox behind the enemy AI, and once the player is inside their hitbox, he should be able to press “F” and destroy them. I’ve tried quite a few different ways. My logic at the moment is, Once the player hits the collision box, set the variable “InHitBox” to true, then the palyer can press “F” check the variable is true, then if so -destroy the actor. I feel like I’m missing something simple, or have I made abit of an oversight? I’ve tried casting to the player and also trying to find a on button press fuction which isn’t an event but I’m not having much luck.
Any help big or small would really be appreciated.
Thanks for all the fish.