ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.13k stars 2.2k forks source link

How do I make the zoom change depending on the character that focuses after a specific moment in the song? #15554

Open Mrmandarina253 opened 1 month ago

Mrmandarina253 commented 1 month ago

Describe your problem here.

I've looked everywhere and I only got a code that works perfectly but I need it to activate at a specific time and I don't know how

this is btw

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

HourOfEternity commented 1 month ago

From what I've seen done, you can use something like: function onMoveCamera(focus) runHaxeCode([[ { if(focus == 'yourCharacter' && curBeat == 'currentBeat') game.defaultCamZoom = 0.625; elseif(focus =='yourCharacter' && curBeat != 'currentBeat') game.defaultCamZoom = 0.6; else game.defaultCamZoom = 0.5; } ]]) end

Hope this helps!