Describe your problem here.
Basically, im trying to port my mod that was made in 0.6.3 to 0.7.1h
but the healthbar changed a lot code wise, which made it so im unable to fix the head icons
or at least use updateHitbox('healthBar'); to fix it
so, how do i fix it in psych engine 0.7.1h?


this is how my HealthBar Script in lua looks like
-- Originally Made by Misha21220
-- Edited by ItzJiggzy
-- It Only "works" in Psych Engine 0.7.X
function onCreate()
if getPropertyFromClass('backend.ClientPrefs', 'data.zerothCustomHealthbar') and not hideHud then
customHealthBar_Border()
customHealthBar_Stats()
end
end
function onCreatePost()
if getPropertyFromClass('backend.ClientPrefs', 'data.zerothCustomHealthbar') and not hideHud then
customHealthBar_FlxBar()
-- customHealthBar_Icons()
end
end
function customHealthBar_Border()
-- Border
makeLuaSprite('HealthBarBorder', 'ZerothBarBorderAlt')
setObjectCamera('HealthBarBorder', 'hud')
setProperty('HealthBarBorder.alpha', getPropertyFromClass('backend.ClientPrefs', 'data.healthBarAlpha'))
scaleLuaSprite('HealthBarBorder', 0.8, 0.8)
screenCenter('HealthBarBorder', 'x')
setProperty('HealthBarBorder.y', getProperty('healthBar.y') - 108)
addLuaSprite('HealthBarBorder', true)
-- if downscroll then
-- setProperty('HealthBarBorder.y', getProperty('healthBar.y') - 66)
-- setProperty('HealthBarBorder.flipY', true)
-- end
end
function customHealthBar_Stats()
-- Stats
makeLuaSprite('HealthBarStats', 'ZerothBarStats')
setObjectCamera('HealthBarStats', 'hud')
setProperty('HealthBarStats.alpha', getPropertyFromClass('backend.ClientPrefs', 'data.healthBarAlpha'))
scaleLuaSprite('HealthBarStats', 0.8, 0.7)
screenCenter('HealthBarStats', 'x')
setProperty('HealthBarStats.y', getProperty('healthBar.y') + 25)
addLuaSprite('HealthBarStats', true)
-- if downscroll then
-- setProperty('HealthBarStats.y', getProperty('healthBar.y') + 43)
-- end
end
function customHealthBar_FlxBar()
local centeredFlxBar = 204 - (getProperty('healthBar.width') / 2)
-- flxBar -- Needs Fixing
scaleObject('healthBar', 1.45, 4.3)
-- screenCenter('healthBar', 'x')
setProperty('healthBar.y', getProperty('healthBar.y') - 45)
setProperty('healthBar.x', centeredFlxBar);
-- updateHitbox('healthBar');
end
-- Dont know why i felt proud/satisfied on like this thingy, when it basically others guy code but with my textures
and also, this are the Textures that is using, even tho they are not connected to the actions of the flxBar or the Head Icons
HealthBarBorder:

HealthBarStats:

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.
Yes, I edited a ClientPrefs.hx to add custom options and Playstate.hx to change the healthbarImage without affectting the original healthbar, also Achievements but that doesnt have anything to do with this issue, i didnt change anything on HealthIcon.hx or any of the maths related to the Healthbar or the Head Icons
Describe your problem here.
Basically, im trying to port my mod that was made in 0.6.3 to 0.7.1h
but the healthbar changed a lot code wise, which made it so im unable to fix the head icons
or at least use updateHitbox('healthBar'); to fix it
so, how do i fix it in psych engine 0.7.1h?


this is how my HealthBar Script in lua looks like
and also, this are the Textures that is using, even tho they are not connected to the actions of the flxBar or the Head Icons
HealthBarBorder:

HealthBarStats:

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.
Yes, I edited a ClientPrefs.hx to add custom options and Playstate.hx to change the healthbarImage without affectting the original healthbar, also Achievements but that doesnt have anything to do with this issue, i didnt change anything on HealthIcon.hx or any of the maths related to the Healthbar or the Head Icons