One thing I don't understand is the Time thing (the in-game help only says "Animation data itself"), and also maybe the Item(s). How does SM detect if there's Item 2 or not?
There are multiple usages of SPANIM, but I'm gonna explain the code you'll end up using the most. Refer to screenshot green text. Those numbers are how SmileBASIC knows which sprite to show for how long. Also I haven't looked at it myself, but Nobu created a sample program to illustrate sprite animations. Take a look. [XKA334JX]
OK I'll try to use that as my 2nd reference, as my current reference was this Halloween "Screen Saver"-type program: https://miiverse.nintendo.net/posts/AYMHAAACAAADVHkiYhoPww
And one thing to self-learn was tweaking the values of the SPANIM commands & do some trial-and-error runs, but I'm still having lots of questions later...
Yeah I'm aware you didn't do that hehe.
Anyway there are 2 I also don't understand: "Adding 8 to the target numerical value will cause the value to be treated as being relative to the run time" & "Suffixing the character string with "+" will also cause the value to be treated as being relative to the run time"
What do they mean? Maybe I'll know if I'm already above n00b level...
Anyway, from that Halloween screen saver-type program, if I remove the + from the "XY+" from Line 79, that witch girl sprite will float as it goes to the right. Why is that lol?
Ah ok that made more sense. So SPANIM 11,"XY+",-1000,500,0 means to "display sprite 11, and within 1000/60 sec, move it 500 pixels right and 0 pixels up, endless loop". The + means it's RELATIVE to the current coordinates. Without + it'll mean "display sprite 11, within 1000/60 sec, move it to coordinate (500,0) endless loop." In SmileBasic, coordinate (500,0) is the upper right corner.
So that's what they meant by "adding + means to treat it as being relative to the current state". And since you can shorthand XY to 0 and XY+ to 8, that's the "8" part.
Only "I" and "V" requires positive time (our sense of time) but the remaining five modes ("XY","Z","C" etc) require negative time. Negative time tells the program to CHANGE SMOOTHLY within that time frame. In this case, it has to move the witch smoothly in 16.6 sec. Put a positive time and the witch suddenly appears without moving. Just treat it as a requirement.
Imagine a large image. UV means to move the CAMERA from a particular set of coordinates to another. It doesn't move the image itself like XY, just the view. Umm...get it?
*notices your NNID*
OK, Celadon City is just a large map right? But our view is always one screen at a time. That's because the camera moves with UV. It doesn't actually move the entire Celadon map around, just the view.
Ahh ok.
BTW, does that UV coordinates also determine the pivot for rotation right?
Like for example there's a Yo-yo sprite... if the pivot is the center of the yoyo disc instead of the string, then only the string rotates.