Quote:
Originally Posted by adam
|
So there is..
My rough implementation:
PHP Code:
//#CLIENTSIDE
function onCreated() {
onSetAni2("sword", 0, 6, 0.1, "sword1.png");
}
/*
gani - Animation to draw
frame - Frame to draw
frames - The amount of frames to draw
framelength - Time to draw each frame
param - Optional animation param
*/
function onSetAni2(gani, frame, frames, framelength, param) {
// Draw Frame
setani(format("%s[%i]", gani, frame), param);
// Increment Frame
frame++;
// Make sure animation isn't done
if (frame != frames) {
// Schedule drawing of next frame
this.scheduleevent(framelength, "SetAni2", ani, frame, frames, framelenght, param);
}
}