Very new to BP scripting, I am trying my hardest to start learning BP and so far I enjoy it. However when coming up with simple things such as applying damage to a building that breaks when health reaches zero. I have no idea where to start with it. Ive tried looking up guides but a lot of them are VERY vague and do not explain everything, or they go about doing it in a way that work with the type of game im trying to make. any help on this would be greatly appreciated.
Hi Fantasmagore,
Have a look at our destructible mesh examples, located here:
Effectively, you want to set the damage threshold in the destructible mesh asset to be able to tell it when to break.
I have that set, but how do I go about making my projectile do damage to the destructible
what do you have in your projectile script? I would use an “event hit” node and deal radial damage to the object struck.
Hi Fantasmagore,
Not a problem at all! Set the radius to a higher number as 1uu = 1cm, so you are saying your radius is 5 cm currently. Additionally, just to test and be sure this is working set the damage to a large number, such as 500, then check Do Full Damage = true. Does your wall break apart with the higher damage and radius?
They are breaking now however, they do not break always break. The projectile seems to not be applying the BP options.
Can you post a screenshot of your destructible mesh details pane? It may be that the damage threshold needs to be altered.
I actually made a quick video of whats going on and what im trying to do.
https://www…com/watch?v=zSBolhf-1nY
Your video is listed as private, I cannot view it.
sorry about that, try now.
I noticed a couple of things that may help you:
- Make sure the meshes you have are completely closed, currently there is nothing for the destructible mesh to “cut” through, which may be causing errors.
- Check your damage threshold in your destructible mesh asset and make sure it isn’t set to an absurdly high number.
- Set Damage cap on and Accumulate damage on your destructible mesh in the destructible mesh editor. What is most likely happening is none of your shots are doing the amount of damage necessary to break the object, so it just doesn’t register because you do not have accumulate damage on.
What seems to be happening is, the destructible only breaks when I hold in the left and right click button on my mouse, which left is to move and right is to fire my projectile.
I got it fixed!!! My config in the mesh’s details needed to be altered. Thanks for the help! I really appreciate it.
so what exactly did you do to fix it?