MisterQuestions Posted August 13, 2014 Posted August 13, 2014 Hi, i have a dude and its how to set the volume to 50% or less to play another sounds, and when that sound is finished. stop playing it and set the map music to 100 again, any one could help me? "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
Et-win Posted August 13, 2014 Posted August 13, 2014 local gMap = exports.mapmanager:getRunningGamemodeMap() local mapRoot = getResourceRootElement(gMap) getElementsByType("sound", mapRoot) ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
MisterQuestions Posted September 7, 2014 Author Posted September 7, 2014 Mmmm...And how to set the volume to 50% or less? "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
MisterQuestions Posted September 7, 2014 Author Posted September 7, 2014 so if it will be like this...?? local gMap = exports.mapmanager:getRunningGamemodeMap() local mapRoot = getResourceRootElement(gMap) theSound = getElementsByType("sound", mapRoot) setSoundVolume(theSound, 0.5) "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
koeno100 Posted September 7, 2014 Posted September 7, 2014 so if it will be like this...?? local gMap = exports.mapmanager:getRunningGamemodeMap() local mapRoot = getResourceRootElement(gMap) theSound = getElementsByType("sound", mapRoot) setSoundVolume(theSound, 0.5) Almost. local gMap = exports.mapmanager:getRunningGamemodeMap() local mapRoot = getResourceRootElement(gMap) theSounds = getElementsByType("sound", mapRoot) for placeNumber,sound in ipairs(theSounds) do setSoundVolume(theSound, 0.5) end
MisterQuestions Posted September 7, 2014 Author Posted September 7, 2014 What does this do? for placeNumber,sound in ipairs(theSounds) do "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
koeno100 Posted September 7, 2014 Posted September 7, 2014 theSounds is a table filled with all sounds from gMap that code will basically take every single sound in the table and set the volume to 50%
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