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

![](/files/-MVvKMytzddv3Ek67eeF)

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

![](/files/-MVvJrzg0K-AbeRhqG6u)

* **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 %}

![](/files/-MVvbTtkEcF4OQblHimc)

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

![](/files/-MVvOVE-_F7oPOuVeZ5B)

**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;


---

# 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://traps.runemarkstudio.com/traps/damage-system/damage-source.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.
