Spice Posted July 13, 2015 Share Posted July 13, 2015 function createprog () loadingprog = guiCreateProgressBar(475, 653, 330, 33, false) curprog = guiProgressBarGetProgress (loadingprog) setTimer (guiProgressBarSetProgress, 1000, 10, loadingprog, curprog+10) setTimer (destroyElement, 10010, 1, loadingprog) end Why the progress bar don't increase except once (to 10 %) ? Why the progress bar don't get destroyed after 10 secs Link to comment
Lestat Posted July 13, 2015 Share Posted July 13, 2015 Try: function createprog () loadingprog = guiCreateProgressBar(475, 653, 330, 33, false) setTimer (progress, 1000, 10) setTimer (destroyElement, 10010, 1, loadingprog) end function progress() curprog = guiProgressBarGetProgress (loadingprog) guiProgressBarSetProgress(loadingprog, curprog+10) end Link to comment
Price. Posted July 13, 2015 Share Posted July 13, 2015 I tested this and worked fine with me function createprog () loadingprog = guiCreateProgressBar(475, 653, 330, 33, false) curprog = guiProgressBarGetProgress (loadingprog) guiProgressBarSetProgress(loadingprog,curprog) end setTimer(function() curprog = curprog+10 guiProgressBarSetProgress(loadingprog,curprog) end,1000, 10) setTimer(function() destroyElement (loadingprog) end, 10000, 1) 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