Posts: 116
Threads: 9
Joined: Sep 2016
I had an idea of making playSound take in the name of sound source as a parameter, so it can play different sound in different situations.
Ex: playSound("happySound.wav") when you caught something, and playSound("danger.wav") when you get teleported out of your planned route.
All the sound source needs to be pre-stored in assets folder before you use them of course.
Posts: 228
Threads: 14
Joined: Aug 2016
function onBattleMessage(wild)
if stringContains(wild, "caught") then
playSound("happySound.wav")
end
end
"playSound()" is already implemented, you just have to call it on the right spots.
No support for scripts from other authors or edited scripts ( except config.lua ). If you change something on the "core" and it isnt working anymore then you can fix it by your own.
Feel free to contact me for informations and tips !
Posts: 116
Threads: 9
Joined: Sep 2016
Oh nice, I know it's there already but didn't know it takes params too. I'll try it out.
Posts: 50
Threads: 4
Joined: Aug 2016
I wonder that where is the WAV file has to locate in?
In PROShine folder or Script folder?
Posts: 116
Threads: 9
Joined: Sep 2016
(2016-10-09, 19:28:46)gl3e I wonder that where is the WAV file has to locate in?
In PROShine folder or Script folder?
In Assets folder
Posts: 50
Threads: 4
Joined: Aug 2016
(2016-10-10, 13:59:48)pandabear (2016-10-09, 19:28:46)gl3e I wonder that where is the WAV file has to locate in?
In PROShine folder or Script folder?
In Assets folder
It's not work
Posts: 9
Threads: 1
Joined: Oct 2016
2016-10-17, 12:53:08
(This post was last modified: 2016-10-17, 12:54:51 by satorrey.)
try
function onBattleMessage(wild)
if stringContains(wild, "caught") then
playSound("Assets/sound1.wav")
end
end
- put .wav file in Assets folder in PROShine folder