Want to add sound to existing trigger

Post Reply
User avatar
Hoax13
Posts: 1
Joined: Tue Feb 09, 2021 4:59 pm

Want to add sound to existing trigger

Post 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

csparkman34
Posts: 1
Joined: Wed Feb 10, 2021 2:35 pm

Re: Want to add sound to existing trigger

Post 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

Post Reply