Hit Effects (Flash)

Hit Effects (Flash) post thumbnail image

Hit effects are sounds and graphical effects typically played in response to in game hits to add audio graphical appeal. OpenBOR has a suite of native hit flash effects to give your projects a personal touch.

Documentation in progress.

Flash Adjustments

Position and Layer

As OpenBOR games normally include Z axis movement, you’ll want to make sure the flash spawns appear in a way that looks best for your game. By default, OpenBOR positions flash entities at a collision’s point of contact. The flash entity’s drawing layer is then adjusted to overlay on the attacker or target (whichever is closer to player’s point of view). Modify this behavior using the properties below.

Flash Z Source

This group of properties determines where OpenBOR will get the initial Z position for spawning flash entities.

  • global_config_flash_z_source (default 0) – Models.txt property. Initial Z source value for all native flash spawns.
  • attack.effect.hit.flash.z.source (default 0) – Attack box property. Adjusts flash Z source for the attack body.
  • bbox.effect.hit.flash.z.source (default 0) – Body box property. Adjusts flash Z source for the body box.

OpenBOR will apply the total of all properties and use it to determine the Z position as follows:

Flash Z SourceFlash Z Position
<= -255Lowest Z Axis position between attacker and target.
> -255 and < 0Attacker’s Z Axis position.
0Exact point of collision.
> 0 and < 255Target’s Z Axis position.
>= 255Highest Z Axis position between attacker and target.

Note that for scripted hits, missing attacker or target entities both default to point of collision, which itself defaults to 0.

Tip: This system is designed so you can prioritize the global, attack, or body box properties on a case by case basis.

Flash Layer Source

Flash layer automatically sets the initial setlayer property of flash model. This allows it to appear overlaid (or behind) consistently regardless of its actual Z position. Flash layer includes a source adjustment similar to Z Source, and a static adjustment.

  • global_config_flash_layer_source (Default 255) – Models.txt property. Initial Flash Layer source value for all native flash spawns.
  • attack.effect.hit.flash.layer.source (Default 0) – Attack box property. Adjusts Flash Layer source for the attack body.
  • bbox.effect.hit.flash.layer.source (Default 0) – Body box property. Adjusts Flash Layer source for the body box.

OpenBOR determines the drawing layer using total Flash Layer value as follows:

Flash LayerInitial Layer Value
<= -255Lowest Z Axis position between attacker and target.
> -255 and < 0Attacker’s Z Axis position.
0Exact point of collision.
> 0 and < 255Target’s Z Axis position.
>= 255Highest Z Axis position between attacker and target.

Flash Layer Adjustment

Flash layer adjustment properties are added as an arbitrary adjustment after other calculations.

  • global_config_flash_layer_adjust (Default 1) – Models.txt property. Initial Flash Layer adjustment for all native flash spawns.
  • attack.effect.hit.flash.layer.adjust (Default 0) – Attack box property. Adjusts Flash Layer adjustment for the attack body.
  • bbox.effect.hit.flash.layer.adjust (Default 0) – Body box property. Adjusts Flash Layer adjustment for the body box.

2 thoughts on “Hit Effects (Flash)”

Comments are closed.

Related Post