#Paper Posted September 4, 2011 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?
IIIIlllllIII Posted September 5, 2011 Posted September 5, 2011 sorry explaine more i dont understand what is ur problem !
SDK Posted September 5, 2011 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)
#Paper Posted September 6, 2011 Author Posted September 6, 2011 Yes SDK, tha'ts my question, but how can i calculate the amount?
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