Environmental Damage - Killzone Element
Environmental damage like fire or gas clouds that damage players, or even enemies in some cases, are easily set up using Area Trigger and Killzone elements.
Defining The Area
To define the area in which the damage should apply, place a Shape element and adjust the width, depth and height if needed. Multiple Shape elements can be used for more complex areas.
Set Up The Elements
Place a AreaTrigger element and link it to the Shape element by holding space-bar and clicking the Shape element while the AreaTrigger is selected, or with the Manage Use Shape Element ID List button.
Using Shape elements for this is not actually required, however if more than one type of instigator (players, enemies, civilians, etc.) should be affected, multiple AreaTrigger elements are required since they can only use 1 type per trigger.
The area for the AreaTriggers would need to be set up individually for each trigger element. Using Shape elements instead, the whole process only needs to be done once and any AreaTrigger element can just link to and use the Shapes.
Place a KillZone element, choose a damage type and have it get executed by the AreaTrigger.
Keep in mind that not every damage type is available to every instigator, more information on that can be found here.
AreaTrigger Settings
Depending on who should get damaged, the AreaTrigger needs to be set up differently.
Player / Team AI
For players and team AI, set Trigger On to "both", Instigator to "player" or "ai_teammates" as well as Trigger Times to "0".
This will execute the KillZone every time someone enters the AreaTrigger, activating the damage effect. When leaving the AreaTrigger, the KillZone gets executed once again, deactivating the effect.
The Trigger Times set to "0" ensures that it can execute infinitely without disabling itself.
Enemies / Civilians
For enemies and civilians, it also depends on what damage type is set in the KillZone.
If the instigator should get affected instantly when entering, set the instigator to either "enemies" or "civilians". For Trigger On set it to "on_enter" and Trigger Times to "0".
If instead a random instigator should get picked with a delay in between, set Trigger On to "while_inside" and Trigger Times to "1".
Place a Toggle element and have it get executed by the KillZone element with a short delay, for example "2.0" seconds. Link the Toggle to the AreaTrigger and set the Set Trigger Times to "1".