> For the complete documentation index, see [llms.txt](https://wise-labs.gitbook.io/replicated-explosion-plugin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wise-labs.gitbook.io/replicated-explosion-plugin/first-contact/setup-explosion-component.md).

# SetUp Explosion Component

Here you will understand all the variables and the functions of each one!

If you have a barrel and want to make it explode when hit by a projectile, or something similar. just add the "Explosion" component and you can rename it to anything, you will see that the component will have a variable, called "Explosion Profile", which must be filled with a data asset:

<div align="left"><figure><img src="https://740330515-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy7Y0IXTlfRdsxLfAMhkB%2Fuploads%2Fz2ulkM6UnWq483hUgWsu%2Fimagem_2024-04-09_170242688.png?alt=media&amp;token=78d92d33-aeee-46e0-b871-8aa2af32ddbf" alt=""><figcaption></figcaption></figure></div>

* By default, we already have an example data asset, which works well:

<div align="left"><figure><img src="https://740330515-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy7Y0IXTlfRdsxLfAMhkB%2Fuploads%2FNJoh28yr3jzzOjoIh2nX%2Fimage.png?alt=media&amp;token=57d04b0f-4d4d-4981-9d8d-9fa7fdf13dd1" alt=""><figcaption></figcaption></figure></div>

* If you don't see it, just select show plugin content, as in the image below:

<div align="left"><figure><img src="https://740330515-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy7Y0IXTlfRdsxLfAMhkB%2Fuploads%2FcD9AnubCcwy9zbpl1shC%2Fimage.png?alt=media&amp;token=985fb559-b94f-4bc8-94be-0293b42137f0" alt=""><figcaption></figcaption></figure></div>

* Okay, now you just need to use this function to make the explosion happen:

<div align="left"><figure><img src="https://740330515-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy7Y0IXTlfRdsxLfAMhkB%2Fuploads%2FLrv3zMwRgY6wbUl6wlER%2Fimage.png?alt=media&amp;token=a9a144b4-f26a-4bba-bb5b-6cba451c4af5" alt=""><figcaption></figcaption></figure></div>

* If you want to customize the explosion just duplicate the data asset pattern and change the variables to anything you want, the variables are these:

<div align="left"><figure><img src="https://740330515-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy7Y0IXTlfRdsxLfAMhkB%2Fuploads%2FHfB9C5K6zGMOfgsIhxAa%2Fimage.png?alt=media&amp;token=5c9982f0-4f2a-4f8a-a360-f8645688c637" alt=""><figcaption></figcaption></figure></div>

* After configuring this, you need to implement an interface on the objects you want the explosion to affect, called "Damage\_Interface", which will provide you with a function called "OnExplosionHit", in it there are two "Damage" entries of type float that mark the damage and " ExplosionSource" of type Actor that marks the explosion object. You can put the “Apply Damage” function that will already apply the damage, something like this:

![](https://740330515-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy7Y0IXTlfRdsxLfAMhkB%2Fuploads%2F1Jdwz5LtwIeVrZaaCR3P%2Fimage.png?alt=media\&token=0fe5d08c-42ba-4ca5-b262-06986afd8f01)
