Playing a .wav file using scripts

Description: Have idea for a script, but you can't make it? Post it here!
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

Spectra
Topic author, Duke
Duke
Avatar
Spectra
Topic author, Duke
Duke
Age: 19
Reputation: 6
Posts: 125
Joined: 30 Jan 2018
Location: The dream star
YouTube

Post #1by Spectra » 28 May 2018, 10:43

is there a possible way to play a wav file using scripts?
-No interesting comments here-

Eri7 M
Viscount
Viscount
Avatar
Eri7 M
Viscount
Viscount
Age: 18
Reputation: 82
Posts: 327
Joined: 19 Dec 2016
Location: Germany , Bonn

Post #2by Eri7 » 28 May 2018, 14:47

Yes with Audioset.
Join the discord server about Nova Projects.
Image

Image

Spectra
Topic author, Duke
Duke
Avatar
Spectra
Topic author, Duke
Duke
Age: 19
Reputation: 6
Posts: 125
Joined: 30 Jan 2018
Location: The dream star
YouTube

Post #3by Spectra » 28 May 2018, 19:34

Eri7 wrote:Yes with Audioset.

When i tried audioset, it played wart's bubble sound instead of the .wav file
-No interesting comments here-

Yave Yu M
Marquis
Marquis
Avatar
Yave Yu M
Marquis
Marquis
Age: 24
Reputation: 37
Posts: 186
Joined: 25 Jan 2016

Post #4by Yave Yu » 15 Oct 2018, 13:44

First you need to load SFX, use Call AudioSet(1,ID,0,"Your Filename"), the ID can be more than 92. After load SFX, use Call AudioSet(2,ID,0,"") to play, leave "" blank.
Visit my YouTube channel Yave Yu!

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 256
Posts: 592
Joined: 9 Nov 2015
Website

Post #5by Lx Xzit » 16 Oct 2018, 7:27

example loading a sound effect:
call audioset(1, 99, 0, "\myCustomSong.wav")

to play it just use the ID assigned to it, in this case 99.

(Worth to note that in the given example the sound effect is located in the same folder as the .lvl file, so if you put it inside the graphics' folder you should specify it in the filepath)
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

Spectra
Topic author, Duke
Duke
Avatar
Spectra
Topic author, Duke
Duke
Age: 19
Reputation: 6
Posts: 125
Joined: 30 Jan 2018
Location: The dream star
YouTube

Thanks

Post #6by Spectra » 17 Oct 2018, 9:51

Thanks for the help :)
-No interesting comments here-


Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 4 guests