• Hi Guest!

    Please be aware that we have released another critical security patch for VaM. We strongly recommend updating to version 1.22.0.12 using the VaM_Updater found in your installation folder.

    Details about the security patch can be found here.

Question I want to play a sound from a script.

Feel

Well-known member
Featured Contributor
Messages
581
Reactions
2,745
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