Page 1 of 1

Want to add sound to existing trigger

Posted: Tue Feb 09, 2021 5:14 pm
by Hoax13
Need help adding sound to this script I picked up. What I want to do is add a sound file to go off with the 'Then' part but not the "Else' part




1 if (tonumber(matches[2])>18) and (tonumber(matches[3])>13) and (tonumber(matches[4])>13) and
(tonumber(matches[5])>17) and (tonumber(matches[6])>17)
2 then send( 'say hey hey hey')
3 else send( 'disengage' )
4 end

Re: Want to add sound to existing trigger

Posted: Wed Feb 10, 2021 2:41 pm
by csparkman34
You would just add the necessary code to play a sound file between the "then" and the "else".
e.g.

Code: Select all

then 
    send( "say hey hey hey") 
    playSoundFile([[C:\Users\Default\Sounds\testsound.wav]]) 
else