AM_AudioSource

AM_AudioSource

Provides an actor with the ability to play sounds. This actor's pawn must have the PM_AudioSource mixin.

Methods

# playSound(url, volumeopt)

Sends a message to its pawn telling it to play a sound.

Parameters:
Name Type Attributes Default Description
url string

The url of an external sound asset.

volume number <optional>
1

The volume of the sound from 0 to 1.

Example
import mySound from "./assets/boing.mp3";
myActor.playSound(mySound, 0.5);