# Damage Source

This component does the specified Damage to all *IDamageable* that qualifies for its condition. These are based on the mode and the duration of the damage source.&#x20;

**Modes:**

* **Volume:** Does damage amount as long as the damageable is within the volume. Needs a Collider set to Trigger.

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MVv4Yx2p0KBh5nP4n8z%2F-MVvKMytzddv3Ek67eeF%2Fdmg-volume.PNG?alt=media\&token=32182a47-aca7-445a-a13e-0f15ca9a39ac)

* **Contact:** Needs a Collider (leave *isTrigger* unchecked). Important: don't forget to set your collision Layers accordingly.&#x20;

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MVv4Yx2p0KBh5nP4n8z%2F-MVvJrzg0K-AbeRhqG6u%2Fdmg-source01.PNG?alt=media\&token=91d0b6b9-d991-4e07-a6f7-edd0933b8a2b)

* **Particle:** Needs a Particle Handler and a Particle System with Collisions turned on. The component deals the specified damage when the target is colliding with the particles.
* Tick Cooldown: specifies the time between two damage events. This is useful for dense particle systems where you don't want the player to suffer damage from each particle he collides with.

{% hint style="info" %}
Important: Particle Mode only works with Continuous duration.&#x20;
{% endhint %}

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MVvZYgHtDHOHnuPzvyi%2F-MVvbTtkEcF4OQblHimc%2Fdmg-particle.PNG?alt=media\&token=df771b5b-0564-4c6b-92ce-c4c143a33f55)

* **Ray:** Needs a [Ray Handler](https://app.gitbook.com/@runemarkstudio/s/deadly-dungeons/~/drafts/-MVv5Wz9S1GutR_VLVPo/traps/effect-handlers/ray-handler). This component deals damage when the Raycast from the handler hits its target, specified by Layer Mask. Can be used with all duration modes.

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MVv4Yx2p0KBh5nP4n8z%2F-MVvOVE-_F7oPOuVeZ5B%2Fray-dmg.PNG?alt=media\&token=cb756bc5-11b0-4a17-b407-90215c368b9d)

**Duration:**

* **Once:** the damage event is happening once per event.
* **Continuous:** the damage is dealt until the collision is happening (for example, the player is within the damage volume, or in contact with the trap's collider.)
* **Tick Cooldown** is the time (in seconds) between two damage events.&#x20;
* **Controlled by Mechanism:** the trap will only deal damage on certain Mechanism Events. Drag this component to an empty Event slot and specify an Action. &#x20;
