Forum




What's the best way to implement an animation ?
7 replies



The only way I can think of is using image function to show different images over a period of time. What other way to implement images is there? I suppose you could do the same with map entities but you can't control as much.
I am not aware of any other ways to even implement an animation so I can't say that there's a better way to do it than what I described. It's the only option out there.
If you're asking how exactly to implement it with lua, I'd probably load the image frames first and then juggle with their transparency. That way you wouldn't have to make images every time you want to show an animation.



Don't use

edited 1×, last 20.05.16 09:06:57 pm

Each function consists of methods, instructions and so forth that are either small or big. Since, for example, we want to implement an animation, you wouldn't simply just use the




1
local img = image("<spritesheet:PATH:FRAMEW:FRAMEH[:MODE]>", ...)

1
imageframe(img, 2)



Well with the power of spritesheet image and hooks, you can create an animation. Note that in multiplayer your animation might look weird.



