50p Posted October 18, 2012 Posted October 18, 2012 Info: SpriteAnim lib. Have you even wanted to make 2D animations in MTA with sprite sheets? Here is a library to help you out.Here is a video to show you a few examples: This resource is an example of how to use it. Want to use the lib in your own script? Just copy the c_SpriteAnim.lua file to your resource and add it to meta.xml. How to use the lib: To create your own animation you need to call SpriteAnim: new() function. Here are its parameters: SpriteAnim: new( filename, x, y, width, height, uCount, vCount, fps ) * filename: path to the sprite sheet * x, y: X and Y position of the animation on the screen * width, height: exactly what it says (single sprite size is best) * uCount, vCount: number of frames in a row and column (respectively) * (optional) fps: frames per second (speed of the animation itself) Additional tool: Gif 2 Sprite is a tool that will let you create a sprite sheets from GIFs, so you can create animations for your server even easier! Have a look yourself: Download: SpriteAnim library: https://community.multitheftauto.com/index.php?p= ... ls&id=5832 Gif 2 Sprite tool: http://scripteditor.beta.mtasa.com/files/Gif2Sprite.zip
Castillo Posted October 18, 2012 Posted October 18, 2012 Good work, I made a similar function ( not a library ) with DirectX.
GodFather Posted October 19, 2012 Posted October 19, 2012 Watch the video? You can make picture animations or gifs you just use multiple .png.
50p Posted October 19, 2012 Author Posted October 19, 2012 Thanks guys. I'd like to see people using it on their servers. what is this for?for what can i use it? Sprite animation has been used in games for very long time. Most of the time it's used for 2D animations. Watch this video and hopefully you'll understand better
Renkon Posted October 23, 2012 Posted October 23, 2012 This could be useful to make something like GIFs, right?
Castillo Posted October 23, 2012 Posted October 23, 2012 It's exactly what it does, it can be used to simulate .gif images.
50p Posted October 27, 2012 Author Posted October 27, 2012 Added a small stand-alone application which allows you to create sprite sheets from GIFs. Check the first post.
Ransom Posted October 27, 2012 Posted October 27, 2012 Very neat. @xTravax this kind of thing is usually just for the user HUD. Think something like star fox with the animated windows coming up from Peppy. DO A BARREL ROLL!!! You could do something like make an animation purchase shop and show all the previews in 2D. You could make a platformer game for waiting players. You could make animated cursors like RTS games use for shooting off nukes and such. You could make unit pictures like in RTS that show a little animation loop of some sort. You can make a Wolfenstein 3D type health display where the face gets bloodied up as you're dying. Lots of uses...
MTA Team 0xCiBeR Posted May 5, 2013 MTA Team Posted May 5, 2013 How do you eliminate the sprite image..I only want the animation? ._. Help plss
50p Posted May 6, 2013 Author Posted May 6, 2013 @ciber, the whole point is to use the sprite image. Since you can't simply draw .gif animation in MTA I made this sprite animation library. As you can see in the video I switch between sprites.
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