animInfo
?
#3810
-
There's this script in funkin.art which returns animation info into a TXT file, only GF in the Character Select uses this. What exactly does this do? And is it needed for modding playable characters? There's also this function which parses the data, but it doesn't tell much. Not to mention it's unused: /**
* @param animInfo Should not be confused with animInInfo!
* This is merely a local var for the function!
*/
function doFade(animInfo:FramesJSFLInfo):Void
{
fadeTimer += FlxG.elapsed;
if (fadeTimer >= 1 / 24)
{
fadeTimer -= FlxG.elapsed;
// only inc the index for the first frame, used for reference of where to "start"
if (fadeAnimIndex == 0)
{
fadeAnimIndex++;
return;
}
var curFrame:FramesJSFLFrame = animInfo.frames[fadeAnimIndex];
var prevFrame:FramesJSFLFrame = animInfo.frames[fadeAnimIndex - 1];
var xDiff:Float = curFrame.x - prevFrame.x;
var yDiff:Float = curFrame.y - prevFrame.y;
var alphaDiff:Float = curFrame.alpha - prevFrame.alpha;
alphaDiff /= 100; // flash exports alpha as a whole number
alpha += alphaDiff;
alpha = FlxMath.bound(alpha, 0, 1);
x += xDiff;
y += yDiff;
fadeAnimIndex++;
}
if (fadeAnimIndex >= animInfo.frames.length) fadingStatus = OFF;
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Enabling the debug functions reveals that it would've done this: I assume this is how the gf's were meant to transition from one to another but was scrapped in favour of animations, since it's unused and all. |
Beta Was this translation helpful? Give feedback.
Enabling the debug functions reveals that it would've done this:
https://github.com/user-attachments/assets/399bfced-6096-4982-b739-57977dd2ffcf
I assume this is how the gf's were meant to transition from one to another but was scrapped in favour of animations, since it's unused and all.
Considering this is unused I doubt that this is needed for a custom character for the time being.