Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health drain during Opponent's turn #3911

Closed
who-is-thiss opened this issue Jan 24, 2022 · 1 comment
Closed

Health drain during Opponent's turn #3911

who-is-thiss opened this issue Jan 24, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@who-is-thiss
Copy link

Describe your problem here.

How can I make it so that every time the opponent hits a note, BF loses a little bit of health? I want to see if I can do this with lua so that I don't need to mess with the Source Code

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

@who-is-thiss who-is-thiss added the help wanted Extra attention is needed label Jan 24, 2022
@frantastic24
Copy link

frantastic24 commented Jan 24, 2022

function opponentNoteHit(id, direction, noteType, isSustainNote)
     if getProperty('health') > 0.2 then --prevent opponent from killing by just singing too long
          if not isSustainNote then
               setProperty('health', getProperty('health')-0.02); --amount to lose on normal notes
          else
               setProperty('health', getProperty('health')-0.01); --amount to lose on sustain part of notes
          end
     end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants