ShadowMario / FNF-PsychEngine

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

Custom health bar #11378

Closed Gurudevsing closed 1 year ago

Gurudevsing commented 1 year ago

Describe your problem here.

HOW TO ADD CUSTOM HEALTH BAR IN LUA SCRIPT

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

frantastic24 commented 1 year ago

Place your custom healthBar.png inside images

yelleko1 commented 1 year ago

If it is transparent, i recommend hiding the health bar background and making a new health bar sprite because changing a health bar color of the sprite will be harder to do

Gurudevsing commented 1 year ago

Place your custom healthBar.png inside images

No i don't want to create custom health bar . I just want to use another mode health bar ,(INDIE CROSS)To my mod and I want to fix that health bar on particular stage not particular song

Gurudevsing commented 1 year ago

Place your custom healthBar.png inside images

????

yelleko1 commented 1 year ago

Place your custom healthBar.png inside images

????

He means, put your new healthbar.png sprite inside Mods/Images, and then change the positions with lua

Gurudevsing commented 1 year ago

Place your custom healthBar.png inside images

????

He means, put your new healthbar.png sprite inside Mods/Images, and then change the positions with lua

Screenshot (58)

THIS SPRITE FROM HOPE AND MADNESS MOD , I PUT MY EXAMPLE SPRITE IN CORRECT LOCATION, AND I DON'T KNOW FUNCTION ON ADDING BOTH P1 AND P2 HEALTH BAR , DONT KNOW HOW THEY ARE MOVING WHEN THEY ARE HIT NOTE

Screenshot (59)

I THINK THIS CODE IS FOR CHANGING ICON P1, P2 HELP ME

yelleko1 commented 1 year ago

do something like setProperty('healthBar.y', getProperty('scoreTxt.y') + 5) you arent meant to change the icons

Gurudevsing commented 1 year ago

do something like setProperty('healthBar.y', getProperty('scoreTxt.y') + 5) you arent meant to change the icons

No i don't mean about changing icon iam about adding those health bar only

Gurudevsing commented 1 year ago

do something like setProperty('healthBar.y', getProperty('scoreTxt.y') + 5) you arent meant to change the icons

do something like setProperty('healthBar.y', getProperty('scoreTxt.y') + 5) you arent meant to change the icons

the default health bar is still there. how to add the bar

yelleko1 commented 1 year ago

do something like setProperty('healthBar.y', getProperty('scoreTxt.y') + 5) you arent meant to change the icons

do something like setProperty('healthBar.y', getProperty('scoreTxt.y') + 5) you arent meant to change the icons

the default health bar is still there. how to add the bar

setProperty('healthBarBG.visible', false)

makeLuaSprite('healthBarBGNEW', 'your image here', 0, 0) setObjectCamera('healthBarBGNEW', 'camHUD') addLuaSprite('healthBarBGNEW')

Please check the wiki

BLAZ3RZ commented 3 months ago

Can someone send me a script of this entire thing please? Ive been trying to look for something similar to this everywhere, and I couldn't find anything. ;-;

JogadorCriador commented 2 months ago

https://github.com/ShadowMario/FNF-PsychEngine/wiki/Lua-Script-API:-Variables This can help maybe