thanks smallg but i sincerely didnt undestand what you wrote..
btw the original scirpt i linked above waas for the original Dvader healthbar script and sincerely i noticed that changing the bar texture with another i solved the issue with the original healthbar script.. so iused the same bar bor my hunger script and i have a strange issue since bar never go down..but with the prevoius bar (that one form my video) the bar goes down...i 'm going crazy
btw this is my hunger script
-- JC LEON Hunger System v.1.0
-- Keep This
g_survival = {}
function hunger_system_init(e)
--Load image for hungerbar
cursor_il=LoadImage ( "scriptbank\\images\\hungerbar\\hungerbar.png" )
StartTimer(e)
-- Customization --
-- CUSTOMIZATION --
-- Survival Name
survivalname = "Hunger"
-- Init Survival
g_survival = 100
-- Max Survival
maxsurvival = 100
-- Min Survival
minsurvival = 0
-- Survival Tick Rate (1000 = 1 Sec)
survivaltime = 300 -- 15 Seconds Default 15000
-- Init Values --
survivaltimeron = 0
end
function hunger_system_main(e)
-- Create Hunger Bar
cursor_sd=CreateSprite ( cursor_il )
SetSpritePosition ( cursor_sd , 3 , 92 )
SetSpriteSize( cursor_sd,g_survival/(maxsurvival/10),1)
--Check payerhealth
if g_PlayerHealth <= 0 then
g_survival = maxsurvival
end
-- Kill Player Ff Starved Or Dehydrated
if g_survival <= 0 then
g_survival = minsurvival
--HurtPlayer(e,g_PlayerHealth)
--SetSpriteSize( cursor_sd,g_survival/(minsurvival/10),1)
if GetTimer(e) > 100 then
HurtPlayer(-1,1)
StartTimer(e)
end
end
-- Turn Timers On
if survivaltimeron == 0 then
StartTimer(e)
survivaltimeron = 1
end
-- Check Time
if survivaltimeron == 1 and GetTimer(e) >= survivaltime then
g_survival = (g_survival - 1)
survivaltimeron = 0
end
-- Set Survival To Max If Over
if g_survival > maxsurvival then
g_survival = maxsurvival
SetSpriteSize( cursor_sd,g_survival/(maxsurvival/10),1)
end
-- Display Survival Info
Text(89,80,3,survivalname .. ": " .. g_survival)
end
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB
PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB