I am making shooter NPC using behaviour tree. I created event “On Dead” and when it runs npc should disable ai controller with behaviour tree. UE says everything works fine, even breakpoint. I used Stop Logic with brain component, but it doesn’t work.
it doesn’t work
is quite a broad definition, so it would make problem easier to solve if you provide more details about what exactly doesn’t work as you expect.
As a guess: as far as i can see, “Stop Logic” should only stop logic. It does nothing to task that is already running, as they should be stopped manually. Probably “BTTask::ReceiveAbort” could been called at this moment, so you can try to implement it
I expected that “Stop Logic” will disable all bt tasks.i mean stop logic must turn off ai controller and running behaviour tree, so when npc is dead it should stop all logic. I followed this tutorial and it https://www.youtube.com/watch?v=m6sJRZTcNJA&t=402s, in 6:40 he used same nodes, and it worked perfectly.
Shouldn’t it stop the behavior tree simulation and destroy the AI controller? I am trying to do the same in my project as well using 5.4. because if the enemy is at last hp, It dies but the attack continues. I’ve implemented this damage system https://www.youtube.com/watch?v=htFAeywLuNQ&list=PLNwKK6OwH7eW1n49TW6-FmiZhqRn97cRy&index=7 and on death of enemy, the capsule component still is present in the scene, only mesh ragdolls and capsule continues the attack. and the behaviour tree does not stop simulating