Hit Effects
Hit effects are sounds and visual effects played in response to in-game hits. They provide impact feedback and help communicate damage, blocking, and other combat results. OpenBOR includes native hit-sound and hit-flash systems that creators may configure to give projects a distinct presentation.

Hit Sounds
OpenBOR provides native sound playback for successful hits, blocked attacks, and indirect impacts. Attack boxes may select custom hit and block sounds, while engine defaults provide traditional beat 'em up impact audio when no custom sample is supplied.
Hit Sound
attack.effect.hit.sound.path {path}
Sets the sound played when the attack box successfully hits a target.
# Custom hit sound.
attack.effect.hit.sound.path data/sounds/heavy_hit.wav
# Disable the attack box's normal hit sound.
attack.effect.hit.sound.path none
New attack boxes use data/sounds/beat1.wav by default. Setting the property to none disables normal hit-sound playback for that attack box.
The legacy property hitfx remains available, though new projects should use attack.effect.hit.sound.path.
Block Sound
attack.effect.block.sound.path {path}
Sets the sound played when a target blocks the attack.
attack.effect.block.sound.path data/sounds/heavy_block.wav
When no custom block sound is supplied, OpenBOR uses the global data/sounds/block.wav sample.
Setting the property to none removes the custom sample and returns playback to the global block sound. It does not silence block impacts.
The legacy property blockfx remains available, though new projects should use attack.effect.block.sound.path.
Sound Selection
OpenBOR selects an impact sound according to the hit result and attack state.
| Condition | Sound |
|---|---|
| Attack was blocked | Custom attack-box block sound when available. Otherwise, the global data/sounds/block.wav sample.
|
| Attacker is acting as an indirect or blasting projectile | Global data/sounds/indirect.wav sample when available.
|
| Normal successful hit | Attack-box hit sound. New attack boxes default to data/sounds/beat1.wav.
|
Block and indirect sounds take priority over the normal attack-box hit sound.
Playback Speed
OpenBOR ordinarily modifies the playback speed of normal hit sounds according to attack force. Stronger attacks play the sample at a lower speed, producing a deeper and heavier impact.
Playback speed begins at 100 and decreases as attack force increases, with a minimum of 60.
playback_speed = 100 - (attack_force - 5)
The final value is limited to the range 60 through 100.
The Levels.txt command noslowfx setting disables this adjustment and plays normal hit sounds at speed 100. Block and indirect sounds also play at their normal speed.
Flash Model Sounds
Tip: For many projects, it may be more prudent to play hit sounds through the flash models instead of assigning them directly to attack boxes. Place the sound command before the desired frame in the flash model's animation.
anim idle
loop 0
delay 5
offset 16 16
sound data/sounds/heavy_hit.wav
frame data/chars/misc/heavy_flash/frame01.png
frame data/chars/misc/heavy_flash/frame02.png
This approach packages the visual and audio portions of an impact into one reusable effect model. Different flash models may provide their own sounds, and the sound command may be placed on any frame to synchronize playback with the desired point in the flash animation.
Disable the attack box's native hit sound to avoid playing both sounds:
attack.effect.hit.flash.model heavy_flash attack.effect.hit.sound.path none
Flash-model playback only occurs when the flash entity successfully spawns and reaches the configured animation frame. It also does not receive the native attack-force playback-speed adjustment.
For even more advanced playback, including playback speed control, the flash model can use its animation or spawn scripts to play sound effects.
Hit Flash
Hit flashes are entities that spawn at the location of a hit - usually some form of short lived visual effect. By default flash entities are set to terminate when their ANI_IDLE animation completes. The hit flash to spawn is controlled by both attacker and target. Attack.effect.hit.flash.model and other attack settings nominally determine the flash to spawn, but the target may override these with its model and defense properties. See Collision and Damage Control for details on determining the flash model.
Position and Layer
OpenBOR games commonly allow movement along the Z axis. Hit flashes must therefore be positioned and layered in a way that remains visually consistent when the attacker and target occupy different depths.
By default, OpenBOR places a flash at the collision point. Its drawing layer is then adjusted to place it over the attacker or target nearest the foreground.
Three groups of properties modify this behavior:
- Flash Z Source selects the Z position where the flash entity spawns.
- Flash Layer Source selects the Z position used as the flash entity's base drawing layer.
- Flash Layer Adjustment applies an arbitrary offset to the selected drawing layer.
Global, attack-box, and body-box values are additive. OpenBOR combines all three values before selecting the relevant position or layer.
Flash Z Source
Flash Z Source determines where OpenBOR obtains the Z position used to spawn a native hit flash. The flash's X and Y positions remain at the collision point.
OpenBOR calculates the source value as follows:
flash_z_source =
global_z_source
+ attack_box_z_source
+ body_box_z_source
Properties
| Property | Default | Scope |
|---|---|---|
global_config_flash_z_source {int}
|
0
|
Models.txt property providing the initial source value for all native hit flashes. |
attack.effect.hit.flash.z.source {int}
|
0
|
Attack-box property that adjusts the source value for hits caused by the attack box. |
bbox.effect.hit.flash.z.source {int}
|
0
|
Body-box property that adjusts the source value when the body box receives a hit. |
Source Selection
OpenBOR adds the three properties and selects the flash Z position according to the resulting value.
| Total Source Value | Flash Z Position |
|---|---|
<= -255
|
Lowest Z position between the attacker and target. |
-254 through -1
|
Attacker's Z position. |
0
|
Collision Z position. |
1 through 254
|
Target's Z position. |
>= 255
|
Highest Z position between the attacker and target. |
Note: When a scripted hit does not provide an attacker or target entity, the missing entity's Z position defaults to the collision Z position. An unspecified collision position defaults to 0.
Tip: Since the three properties are added together, an attack box or body box may preserve, counteract, or replace the global behavior for an individual collision.
Flash Layer Source
Flash Layer Source determines the base drawing layer assigned to the spawned flash entity. This allows the flash to remain visually overlaid on the desired participant regardless of the Z position where the flash itself spawns.
Source values do not act as direct layer offsets. They select which Z position OpenBOR uses as the base layer.
OpenBOR calculates the source value as follows:
flash_layer_source =
global_layer_source
+ attack_box_layer_source
+ body_box_layer_source
Properties
| Property | Default | Scope |
|---|---|---|
global_config_flash_layer_source {int}
|
255
|
Models.txt property providing the initial layer-source value for all native hit flashes. |
attack.effect.hit.flash.layer.source {int}
|
0
|
Attack-box property that adjusts the layer-source value for hits caused by the attack box. |
bbox.effect.hit.flash.layer.source {int}
|
0
|
Body-box property that adjusts the layer-source value when the body box receives a hit. |
Source Selection
OpenBOR adds the three properties and selects the flash's base drawing layer according to the resulting value.
| Total Source Value | Base Drawing Layer |
|---|---|
<= -255
|
Lowest Z position between the attacker and target. |
-254 through -1
|
Attacker's Z position. |
0
|
Resolved flash Z position selected by Flash Z Source. |
1 through 254
|
Target's Z position. |
>= 255
|
Highest Z position between the attacker and target. |
The default global value of 255 selects the highest Z position between the attacker and target. This ordinarily places the flash over whichever participant is nearest the foreground.
Flash Layer Adjustment is applied after this source selection.
Flash Layer Adjustment
Flash Layer Adjustment applies an arbitrary offset after OpenBOR selects the flash's base drawing layer.
OpenBOR calculates the final drawing layer as follows:
final_flash_layer =
selected_base_layer
+ global_layer_adjustment
+ attack_box_layer_adjustment
+ body_box_layer_adjustment
Properties
| Property | Default | Scope |
|---|---|---|
global_config_flash_layer_adjust {int}
|
1
|
Models.txt property providing the initial layer adjustment for all native hit flashes. |
attack.effect.hit.flash.layer.adjust {int}
|
0
|
Attack-box property that adjusts the final layer for hits caused by the attack box. |
bbox.effect.hit.flash.layer.adjust {int}
|
0
|
Body-box property that adjusts the final layer when the body box receives a hit. |
Positive values move the flash forward in the drawing order. Negative values move it backward. The default global adjustment of 1 places the flash one layer ahead of its selected source.
Configuration Example
The following example retains the default collision Z position while placing flashes one layer ahead of the participant nearest the foreground.
# data/models.txt
global_config_flash_z_source 0
global_config_flash_layer_source 255
global_config_flash_layer_adjust 1
An individual attack box may override the global source behavior through additive adjustment:
# Select collision Z instead of the global foreground source
# when determining this attack's flash layer.
attack.effect.hit.flash.layer.source -255
With the default global value of 255, the attack adjustment of -255 produces a total layer-source value of 0. OpenBOR therefore uses the flash's resolved Z position as its base drawing layer.
