Thread Tools Display Modes
02-10-11, 04:45 AM   #1
imperialskull
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 3
Animated frames and the horrors of new encoding.

As some of you may already know I have embarked on an epic quest to create an animated frame. Thanks to the help of the community I now have the power ( but not neccessarily the ability) to encode the frames using the AnimateTexCoords () function. I will be the first to admit that my grasp of lua is tenous to say the least. Not wanting to cause myself hours of irritating attempts to plug in values and hope for the best I come to you noble encoders.
I'll start with something simple the basis of the function.

function AnimateTexCoords(texture, textureWidth, textureHeight, frameWidth, frameHeight, numFrames, elapsed, throttle)

this is the part that you expose my lack of skills...

texture is texture name, texture width and height are just that in pixels, the same going for frame, numframes is the number of frames, and elapsed is the time that it takes to run the animation, but what is throttle? that is the question that utterly vexes me.
hopefully I at least got the first part right if not feel free to correct me
thanks again community and I will be sure to credit everyone who helps with code in the final release.

Last edited by imperialskull : 02-10-11 at 04:47 AM. Reason: poor grammar
  Reply With Quote
02-10-11, 05:50 AM   #2
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
Throttle usually means to limit the number of updates per second. In an OnUpdate-script, that runs on each redraw of the screen (your fps), you usually throttle it to update less by using a condition such as a specific interval for example. Throttle in this case is probably the same, if you pass 0.1 to it will only update every 0.1s.
__________________
Oh, the simulated horror!
  Reply With Quote
02-10-11, 06:18 AM   #3
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
No offense, but if I were you, and still very new to Lua,
I would first try to tackle something more simple than frame/texture animations .. ><
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Animated frames and the horrors of new encoding.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off