azul
Junior vMember
Posts: 38
|
Post by azul on Oct 14, 2019 17:59:06 GMT
Is there a way to filter out the type of damage the 'V Health Controller' takes or the 'V Breakable Object' script? I have some breakable objects (like a wooden guard tower) that uses the health controller and it switches to the destroyed model after an On Dead event. Which seems to work fine, but what if I wanted only explosives (like the RPG or Grenades) to affect the object, and not guns or melee damage? It seems that the 'V Breakable Object' has options for 'Max Velocity To Break', which doesn't seem to make much of a difference when adjusted. Any ideas on how to set this up? This would also be great for heavily armored enemies or vehicles that only take damage from explosives for example.
|
|
|
Post by shadex on Oct 17, 2019 15:43:17 GMT
Is there a way to filter out the type of damage the 'V Health Controller' takes or the 'V Breakable Object' script? I have some breakable objects (like a wooden guard tower) that uses the health controller and it switches to the destroyed model after an On Dead event. Which seems to work fine, but what if I wanted only explosives (like the RPG or Grenades) to affect the object, and not guns or melee damage? It seems that the 'V Breakable Object' has options for 'Max Velocity To Break', which doesn't seem to make much of a difference when adjusted. Any ideas on how to set this up? This would also be great for heavily armored enemies or vehicles that only take damage from explosives for example. So when you use the object damage script, you have to put a collider on it. the size of the collider is the AoE radius. What you want to do with explosions specificly is to find the explosion that is spawned after the RPG hit's or the Grenade explodes, and add object damage with the sphere collider. Make the sphere coliders radius to the size of the AoE, and once the rpg hits, the explosion is spawned with Object damage, and anything in that area will take damage. You can use tags to allow/disallow damage types from effecting your breakable objects.
For a giant lazer beam, or field damage (poison gas, fire) use OnTrigger, and continuous damage.
|
|