ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.06k stars 2.11k forks source link

How to get animation offsets from characters #14750

Open Unbekannnt0 opened 1 month ago

Unbekannnt0 commented 1 month ago

Describe your problem here.

Boyfriend has multiple singing animations: left, down, up, right... All of these animation have a X-offset and a Y-offset, that's in the .json of boyfriend.

Is there a way to specifically get the offset of an animation?

Something like "getProperty('boyfriend.animation.curAnim.offset.x)" or "boyfriend.leftSING.offset.x" or somthing like that to get the offset seen in the character editor?

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows x64

Did you edit anything in this build? If so, mention or summarize your changes.

No response

DetectiveBaldi commented 1 month ago
function onCreatePost()
    debugPrint(getProperty("boyfriend.animOffsets.singLEFT", true)[1]) -- X
    debugPrint(getProperty("boyfriend.animOffsets.singLEFT", true)[2]) -- Y
end