📚
Deadly Dungeons
  • Initial page
  • Traps
    • Introduction
    • Trap Triggers
    • Raycast Triggers
    • Disabling Traps with Triggers
    • Trap
    • Trap Mechanism
      • Animator
      • Launcher
      • Particle (Trap Mechanism)
      • Physics
    • Effect Handlers
      • Audio Handler
      • Particle (Effect Handler)
      • Ray Handler
      • Custom Effect Handler
    • Damage System
      • Damage Source
      • IDamageable
      • Damage Result
    • Damageable Example
    • Utility
      • AutoConnect Joint
      • Texture Mover
Powered by GitBook
On this page

Was this helpful?

  1. Traps
  2. Damage System

Damage Source

PreviousDamage SystemNextIDamageable

Last updated 4 years ago

Was this helpful?

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.

Modes:

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

  • Contact: Needs a Collider (leave isTrigger unchecked). Important: don't forget to set your collision Layers accordingly.

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

Important: Particle Mode only works with Continuous duration.

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.

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

Ray: Needs a . This component deals damage when the Raycast from the handler hits its target, specified by Layer Mask. Can be used with all duration modes.

Ray Handler