#Paper Posted September 4, 2011 Share Posted September 4, 2011 So, i have a lol image, and i have to show it in the screen: more is the speed more times the lol appears in the screen, less is the speed less times the lol appear in the screen. Example: I go to 20mph, the lol appears and disappears 13(random value) times in 20 seconds. I go to 200mph, the lol appears and disappears 18(random value) times in 20 seconds. Someone can explain me how to do? Link to comment
IIIIlllllIII Posted September 5, 2011 Share Posted September 5, 2011 sorry explaine more i dont understand what is ur problem ! Link to comment
#Paper Posted September 5, 2011 Author Share Posted September 5, 2011 Idk how to explain better Link to comment
SDK Posted September 5, 2011 Share Posted September 5, 2011 Sounds sortof like a speedometer ? Create all the images, put them in a table. Use a timer or onClientRender to calculate how many you want to show, hide the rest. local images={} for i = 1, 20 do images[i] = guiCreateStaticImage(0 + width * i, 0, width, heigth, "lol.png", false) guiSetVisible(images[i], false) end function update() --here you do your calculations of how much images you want to be shown, store it into "amount" local amount = ... for i = 1, amount do guiSetVisible(images[i], true]) end for i = amount + 1, #images do guiSetVisible(images[i], false]) end end setTimer(update, 500, 0) Link to comment
#Paper Posted September 6, 2011 Author Share Posted September 6, 2011 Yes SDK, tha'ts my question, but how can i calculate the amount? 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