Vixen
02b45cc4
csharp
public record class AudioEventLayer

Another event played alongside this one, a moment later.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A gunshot is not one sound. It is a mechanism, a report and a tail, each with its own takes, its own level and its own distance behaviour — the mechanism is quiet and carries ten metres, the report is loud and carries five hundred. One clip cannot be both, and three Play calls in gameplay put the layering in C# where the person who can hear it is not.

The layer is a whole event, not a variant. So it has its own variants, its own instance limit and its own parameters, and it can be played on its own as well — a tail that a scripted moment fires directly is the same event the gunshot layers.

Cycles are impossible by construction, which is why nothing checks for them: a layer holds an AudioEvent that already exists, so A can only layer B if B was built first, and B cannot then layer A.

Fields and properties (5)

  • public AudioEvent Sound

    What to play.

  • public float DelaySeconds

    How long after the parent it starts.

  • public float GainDb

    A level trim, on top of whatever the layer's own event says.

  • public float PitchSemitones

    A tuning trim, on top of whatever the layer's own event says.

  • public float Probability

    How often it happens at all, from 0 to 1.

Methods (1)

  • public AudioEventLayer(AudioEvent Sound)

    Another event played alongside this one, a moment later.

Used by (4)

  • AudioEventVixen.Audio
  • AudioEventBuilderVixen.Audio
  • AudioEventDescriptionVixen.Audio
  • LayeredEventTestsVixen.Audio.Tests