LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

How do I use SPANIM?

Root / FAQs / [.]

📌
ElzoBroCreated:
I need to do an Animation with one of my sprites but Idk how to use SPANIM, so I checked the Animation Tool (Anim.) in SmileTool. I can't wrap my head around it. It's really weird. Can anyone help me with sprite animation?

The animation tool in smiletool generate a program that define animations but I don't like it because it use too much space and you need to put that code in other slot. Let me explain you the SPANIM's arguments: Managment Number: This is the number that identify the sprite. Animation Target: This tell what kind of animation you want to use. The types are: -"C": The animation will change the color of the sprite. -"XY": This will change the position of the sprite relative to the point 0,0 or the sprite linked to it. -"Z": This change the Z coordinate. -"I": This will change the sprite's definition number.(The image associated with it). -"R": This change the rotation. -"S": Change the magnification of the sprite. -"V": This change the inner variables of the sprite. Data: This hold the values of the animation. It could be either an array, a list of arguments or a label. The data must follow this format: Frame*, Value**,[Frame, Value]... * The frames between activation. If the value is positive, then the change will occur after the amount of frame defined. However, if it's negative, then the change will be progresive based on a lineal interpolation. **The value is a single number for "I","R","Z","C". For the other, you must use 2 numbers. If the data is stored in a label, then you must put the number of pairs (frame, value) as the first value. Keep in mind that you can set up to 32 pairs on each call of SPANIM. Loop: This tell how many times the animation will be repeated. If it's 0, then the animation enter on an infinite loop. Here is an example:
SPSET 0,0

' THIS LINE SET A WALKING ANIMATION
SPANIM 0,"I",@WALK,0

WAIT 60
SPANIM 0,"C",1,#WHITE,-60,#BLACK,-60,#WHITE,5


@WALK
DATA 4
DATA 5,620
DATA 5,621
DATA 5,622
DATA 5,623

The animation tool in smiletool generate a program that define animations but I don't like it because it use too much space and you need to put that code in other slot. Let me explain you the SPANIM's arguments: Managment Number: This is the number that identify the sprite. Animation Target: This tell what kind of animation you want to use. The types are: -"C": The animation will change the color of the sprite. -"XY": This will change the position of the sprite relative to the point 0,0 or the sprite linked to it. -"Z": This change the Z coordinate. -"I": This will change the sprite's definition number.(The image associated with it). -"R": This change the rotation. -"S": Change the magnification of the sprite. -"V": This change the inner variables of the sprite. Data: This hold the values of the animation. It could be either an array, a list of arguments or a label. The data must follow this format: Frame*, Value**,[Frame, Value]... * The frames between activation. If the value is positive, then the change will occur after the amount of frame defined. However, if it's negative, then the change will be progresive based on a lineal interpolation. **The value is a single number for "I","R","Z","C". For the other, you must use 2 numbers. If the data is stored in a label, then you must put the number of pairs (frame, value) as the first value. Keep in mind that you can set up to 32 pairs on each call of SPANIM. Loop: This tell how many times the animation will be repeated. If it's 0, then the animation enter on an infinite loop. Here is an example:
SPSET 0,0

' THIS LINE SET A WALKING ANIMATION
SPANIM 0,"I",@WALK,0

WAIT 60
SPANIM 0,"C",1,#WHITE,-60,#BLACK,-60,#WHITE,5


@WALK
DATA 4
DATA 5,620
DATA 5,621
DATA 5,622
DATA 5,623
thank you