• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

Question I want to play a sound from a script.

Feel

Well-known member
Featured Contributor
Joined
Aug 18, 2022
Messages
666
Reactions
3,143
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