Faw[Ful] Posted February 21, 2011 Share Posted February 21, 2011 I try to change my music speed with : setSoundSpeed ( song, 50 ) in a classic music script, but It change nothing. function startMusic() setRadioChannel(0) song = playSound("music.mp3",true) setSoundSpeed ( song, 50 ) outputChatBox("Toggle music on/off using M") end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("musicmusic",toggleSong) bindKey("m","down","musicmusic") This is a test ! And the test fail for now ! If it work I will slow down the music when the gamespeed change. Thanks in advance. Link to comment
Aibo Posted February 21, 2011 Share Posted February 21, 2011 speed is set using 0-1 range. so 0.5 for you. well actually not range, it is more like speed multiplier, so 0.5 will be two times slower, and 2 — two times faster. Link to comment
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