# MExplosion

## Overview

<figure><img src="/files/AGO3KQ5dTsv1ap0E7ApF" alt=""><figcaption></figcaption></figure>

This is a component you can add to a gameobject to have an explosion of force.

As of 1.4.2c you will need to trigger a particle effect separately when this begins.

## General

### On Start

When enabled the explosion begins at the start

### Radius

The radius of the explosion

### Life

The life of the explosion in seconds. After this time has elapsed the gameobject is destroyed

## Damage

Properties can be viewed here: [MDamager](/animal-controller/secondary-components/mdamager.md#damage)

## Extras

### Upward Modifier

Muliplies the AddExplosionForce method. The default is 0

### React

Allows the damager to apply a reaction to the animal that is damaged if true

### Custom Reaction

Allows for a custom reaction to apply if React (as above) is true

### Interact

Allows the explosion to activate interactables if true

### Interactor ID

if Interact is true, which ID should it interact with

### Hit Effect

Which Effect should play on impact? The gameobject will be activated, whereas if a prefab, it will be instantiated

### Hit Sound

The default audio clip to play when the explosion hits another object

### Hit Effects

Custom hit effects to use if the gameobject being damaged as different surface ID's

### Destroy Hit Effect

The timer to destroy the hit effect as above. If 0, the effect will not be destroyed

### Stop Animator

Different properties to allow the animator to be stopped when hit. Useful for adding some juice to being hit!

### Audio

The audio source of the explosion

## Events

### On Hit (Transform)

Invoked when the explosion hit any object. It returns what transform was hit

### On Hit Position (Vector 3)

Invoked when the explosion hit any object. It returns the vector3 position of the Hit-Point

### On Hit Interactable(Int)

Invoked if the object hit has an Interactable component. It returns the ID value of the Interaction

### On Profile Changed(Int)

Invoked when the Attack Trigger changes its profile.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/secondary-components/mdamager/mexplosion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
