![]() Local rows = 2 - Amount of vertical frames in the animation Local frames = 2*7 - Amount of frames in the animation Local lastFrame = 1 - Frame the animation starts at ![]() ![]() The code: local warperFramerate = 12 - Do i need to explain this? (Caps at 60 cuz roblox bad) (additionally, this does not support frame skipping) Roblox is a global platform that brings people together through play. Spriteloader.rbxm (5.5 KB) Example Sprite Loader - Roblox To get the amount of frames, you could just count them all, but an easier way is to multiply the complete columns by the complete rows, and adding frames from the incomplete last row, so for us, we have 4 complete rows, and 4 complete columns, and 2 extra frames on the 5th row, so we can simplify this and get 4*4+2, this was apparently more difficult to understand in my last thread, so I wanted to explain more in this one.Īfter that you can plug them into the script which explains how this works in much greater detail than here, but if you read it you will see its actually extremely simple, thank you for reading my thread. When making a sprite, you include incomplete rows. Before we do anything with loading this sprite, we need to know some details about itĬolumns are the amount of frames going horizontally, as we can see from my beautiful example, this gif has 4 columns, to get the amount of rows, thats the amount of frames vertically in the example, so we can see here, we have 4 rows with an incomplete 5th row.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |