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

How to make it possible for a player to die when the opponent is singing and the player's HP is low #14816

Closed
MaksPRO12667 opened this issue Jun 3, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@MaksPRO12667
Copy link

MaksPRO12667 commented Jun 3, 2024

Describe your problem here.

I have a default lua script that allows the opponent to take some HP

function opponentNoteHit(id, direction, noteType, isSustainNote)

if getProperty('health') >= 0.4 then

	setProperty('health', getProperty('health') - 0.01)

end

end

I want to do it when the player's HP is low and when the opponent starts singing, he could kill the player
image

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

@MaksPRO12667 MaksPRO12667 added the help wanted Extra attention is needed label Jun 3, 2024
@xxyuee
Copy link

xxyuee commented Jun 3, 2024

function opponentNoteHit(id, direction, noteType, isSustainNote)
if getProperty('health') <= 0.4 then
setProperty('health', 0)
end
end

@MaksPRO12667
Copy link
Author

function opponentNoteHit(id, direction, noteType, isSustainNote) if getProperty('health') <= 0.4 then setProperty('health', 0) end end

Thank you very much! It worked!

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

2 participants