UFPS :when turret is destroyed

cousinehy

New member
When I shoot that box, it will destroy all the nearest neighbors. That box consist of health, attribute manager. all of the components of the box is came from turret prefab.


fps2.PNG
fps.PNG
shooter.PNG


What I want is when the box or the turret was destroyed it won't destroy the same object around it. Is this possible? or should I need to manually create a code for this?
 
You don't need to set up any custom scripts or flow graphs for this behaviour. The Health component as you've set it up should do what you want on its own. There should be no reason for other objects to be destroyed, unless there is something weird like overlapping hitboxes or one of the objects is a parent to the others.

You can test this in the demo scene: simply add the Health component to a turret and enable "Deactivate On Death" as you have done.
 
Top