This event triggers before certain object sounds are about to be played. For example, item pickup sounds.
--- @param e soundObjectPlayEventData local function soundObjectPlayCallback(e) end event.register(tes3.event.soundObjectPlay, soundObjectPlayCallback)
This event can be filtered based on the
sound event data.
This event supports blocking by setting
true or returning
false. Blocking the event prevents vanilla behavior from happening. For example, blocking an
equip event prevents the item from being equipped.
An event can be claimed by setting
true, or by returning
false from the callback. Claiming the event prevents any lower priority callbacks from being called.
flags(number): A flag whether the sound is looping or not. 0 means the sound doesn't loop, 1 means the sound loops.
pitch(number): The pitch-shift multiplier. For 22kHz audio (most typical) it can have the range [0.005, 4.5]; for 44kHz audio it can have the range [0.0025, 2.25].
sound(tes3sound): The sound about to be played.
volume(number): The volume of the sound. In range [1, 250].