Hi guys is it possible to Pass audioclip as parameter inside functions? The editor says that i can pass struct as parameter.
This should work, yes:
function DoAudioStuff(AudioClip *clip) {
AudioChannel *ch = clip.Play();
ch.Volume = 30;
}
Elsewhere: DoAudioStuff(aTestSnd);
(you probably forgot the asterisk)
And about extender? Is it possible ?
I think so, yes:
function PlayQuietly(this AudioClip*) {
AudioChannel *ch = this.Play();
ch.Volume = 30;
}
aTestSnd.PlayQuietly();
Thanks khris :)