styyx-util 1.0
Utility Header for SKSE Plugin development
Loading...
Searching...
No Matches
st-sounds.h
Go to the documentation of this file.
1//
2// Created by styyx on 12/03/2026.
3//
4
5#pragma once
6namespace StyyxUtil
7{
8 struct SoundUtil
9 {
14 static void PlaySound(const RE::Actor *a_actor, const RE::BGSSoundDescriptorForm *a_sound, const float a_volume)
15 {
16 RE::BSSoundHandle handle;
17 const auto am = RE::BSAudioManager::GetSingleton();
18 am->GetSoundHandle(handle, a_sound->soundDescriptor);
19 handle.SetVolume(a_volume);
20 handle.SetObjectToFollow(a_actor->Get3D());
21 handle.Play();
22 }
23 };
24}
Definition st-actor.h:7
Definition st-sounds.h:9
static void PlaySound(const RE::Actor *a_actor, const RE::BGSSoundDescriptorForm *a_sound, const float a_volume)
Play a specific sound form.
Definition st-sounds.h:14