Skip to content

Limit

Added in 0.2.0
Specification
Applies to
Sounds
File
SOUND.INI / SOUND01.INI
Section
[<Sound ID>]
Value
integer
When omitted
3

How many copies of this sound can play at once; 0 allows any number. A copy counts from the moment the game plays it, including while it waits out a PREDELAY silence, waits for a voice under QUEUE, or sits in the silence between cycles of a loop with a Delay=.

When the limit is reached, the new copy is compared in loudness with the quietest copy already counted. A copy’s loudness is its Volume=, times its distance fade or the loudness the game asked for, times its VShift= draw.

  • If the new copy is louder by more than one percent, the quietest copy stops.
  • If the two are within one percent, the quietest copy stops only with INTERRUPT in the sound’s Control=. Otherwise the new copy is refused.
  • If the new copy is quieter, it is refused.

A refused copy does not play. With QUEUE in Control=, a copy refused when the game plays it keeps trying for up to two seconds first.

sound01.ini
[GUN5]
Limit=2

The limit compares only copies of the same sound, and it applies before the new copy looks for a voice. A new copy that stops the quietest copy must still get a voice under Channels= and Priority=. If the new copy is refused there, the stopped copy does not resume. Priority= decides between different sounds when all voices are in use.

See also — Priority, Control, Channels

History

  1. Added0.2.0In development

    Define sounds with the Yuri's Revenge SOUND.INI keys