ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.11k stars 2.16k forks source link

custom animation mid song #15091

Closed BrokeHrt closed 1 month ago

BrokeHrt commented 1 month ago

Describe your problem here.

so i have this custom animation file that is supposed to be a transition animation for my character. the problem is i have no clue how to code it into the game. i have the files as png and xml files and idk how to code it into the game. tried youtube tutorials but nothing is helpful with what i need

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.

yes, coded new story menu and menu music

nguyenkiet1234d commented 1 month ago

If you want the character to perform animation, you can use event. If it's animation for the stage, you should use it function onCreate()

makeAnimatedLuaSprite('name tag you want', 'folder address in images', x( fill position x), y(fill position y);

addLuaSprite('name tag', false);
addAnimationByPrefix('name tag', 'loop', 'name aimation',  Fill in the frame number of that animation, true);

setProperty('name tag.visible', false) end end function onUpdate() if curStep == (Enter the number of steps in the chart editor) then setProperty('name tag.visible', true) end end If you want the stages to play the animation continuously, change == to >= it's over