Hero192 Posted January 20, 2016 Posted January 20, 2016 Hey guys, I am asking for a proper way for usage setTimer on this function I want to set the timer about 2 secs ( 2000miliseconds) but I failed function onPlaySound() local sound = playSound("file/sound.wav") setSoundVolume(sound, 0.5) end
Ab-47 Posted January 20, 2016 Posted January 20, 2016 function onPlaySound() local sound = playSound("file/sound.wav") setSoundVolume(sound, 0.5) end setTimer(onPlaySound, 2000, 0) This?
ViRuZGamiing Posted January 20, 2016 Posted January 20, 2016 function onPlaySound() local sound = playSound("file/sound.wav") setSoundVolume(sound, 0.5) setTimer ( function() stopSound(sound) end, 2000, 1) end EDIT. This is to stop after 2000 ms, example above will start after 2000 ms
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now