Question I want to play a sound from a script.

Feel

Well-known member
Featured Contributor
Messages
420
Reactions
1,780
Points
93
There is a vam default sound.
I'd like to have this play from a script.



JSONStorableActionAudioClip audioclip = atom.GetStorableByID("HeadAudioSource").GetAudioClipAction("PlayNow");
audioclip.actionCallback = (NamedAudioClip nac) =>
{
SuperController.LogMessage(">> " + nac.displayName);
SuperController.LogMessage(">> " + nac.sourceClip.name);
SuperController.LogMessage(">> " + nac.category);
};

I got to this point.
Afterwards, I don't know how to access the built-in sound.
And I don't even know how to play Audio.

Could you please let me know?
 
Back
Top Bottom