ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.15k stars 2.21k forks source link

Wanting to Add a Custom health Depletion Bar for Custom Notes #15827

Open PoekmasterLegendsv2 opened 2 weeks ago

PoekmasterLegendsv2 commented 2 weeks ago

Describe your problem here.

Well i have Done very Well in The custom Note Animation for Both Bf and Opponent but the small problem is i don't know how to add a Misses to lower health thats all (i don't want to increase health just Lower it).

Here the Code that im Working on

function goodNoteHit(id, noteData, noteType, isSustainNote) if noteType == 'DodgeNote' then if noteData == 0 then playSound('sword-swoosh', 1); objectPlayAnimation('boyfriend', 'singLEFT-alt', false) objectPlayAnimation('dad', 'singSLASH1', false) setProperty('dad.specialAnim', true); end if noteData == 1 then playSound('sword-swish', 1); objectPlayAnimation('boyfriend', 'singDOWN-alt', false) objectPlayAnimation('dad', 'singSLASH2', false) setProperty('dad.specialAnim', true); end if noteData == 2 then playSound('sword-swish', 1); objectPlayAnimation('boyfriend', 'singUP-alt', false) objectPlayAnimation('dad', 'singSLASH1', false) setProperty('dad.specialAnim', true); end if noteData == 3 then playSound('sword-swoosh', 1); objectPlayAnimation('boyfriend', 'singRIGHT-alt', false) objectPlayAnimation('dad', 'singSLASH2', false) setProperty('dad.specialAnim', true); end end end

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

gayloo commented 1 day ago

objectPlayAnimation() is deprected; use either playAnim() or characterPlayAnim(<boyfriend/dad>, , <forced?>) instead.

do note that characterPlayAnim is considered to be deprecated, but still somewhat works