Hello, can you please give me an example of chain of explosions? I tried with OverlapSphere's but no luck...maybe it's with OverlapSphere but I can't do it... it Creates and Destroys maximum of 2 bombs. How can I make it Explode and Destroy all objects in chain? Something like create OverlapSphere for every Destroyed object or before Destroying. And if there is another object with tag BlockBomb within range of Destroyed/Destroying object. Explode and Destroy object, and so on, or any other way. Please help, here is my code for Bomb:
--- BombExplosion -> Prefab, of my explosion
I asked this question recently and the solution that worked best was Using SendMessage to call a explosion function on the object.
A run down is, so say you have a bomb prefab, each has an overlap sphere which populates an array with all the colliders inside the spheres radius. What you want to do is attach a script to the bomb and make a destroy function that when called iterates through that array and sends the destroy function on those objects.
That should do the trick.
p.s. as SilverTabby pointed out its probably a good idea to leave a few frames between each destroy call so maybe add a few yields.
Here is my script