MExplosion

1.4.2c

Overview

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: 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.

Last updated