FlyingSpoon Posted January 19, 2017 Posted January 19, 2017 (edited) local texts = { {"Text 1"}, {"Text 2"}, {"Text 3"}, {"Text 4"}, {"Text 5"}, } dxDrawText("", screenW * 0.3555, screenH * 0.7014, screenW * 0.6414, screenH * 0.8403, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) How would I set a timer for 8 seconds, to go through all the texts in the 'texts table' ? Edited January 19, 2017 by raysmta
JamieSA Posted January 19, 2017 Posted January 19, 2017 try and explain better what your trying to do?
Moderators IIYAMA Posted January 19, 2017 Moderators Posted January 19, 2017 local texts = { "Text 1", "Text 2", "Text 3", "Text 4", "Text 5" } local textIndex = 1 setTimer(function () textIndex = textIndex+1 end, 8000, #texts) ----- dxDrawText(texts[textIndex], screenW * 0.3555, screenH * 0.7014, screenW * 0.6414, screenH * 0.8403, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
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