Hello There, Guest! Login Register


playSound parameter
#1
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.
 
Reply
#2
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 !

 
Reply
#3
Oh nice, I know it's there already but didn't know it takes params too. I'll try it out.
 
Reply
#4
I wonder that where is the WAV file has to locate in?
In PROShine folder or Script folder?
 
Reply
#5
(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
 
Reply
#6
(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
 
Reply
#7
try 

function onBattleMessage(wild)
if stringContains(wild, "caught") then
playSound("Assets/sound1.wav")
end
end

- put .wav file in Assets folder in PROShine folder
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)