I've got a health bar script from another forum http://forum.thegamecreators.com/?m=forum_view&t=194311&b=23 and have run into some troubles with it. One thing I cant get to work is for the health bar to reset to full once the player dies, and another is that picking up health packs dont seem to make any changes to the hud. The health is effected throuh zones and but not enemies. I've tried tweaking the script about but cant seem to get it to work.
;Artificial Intelligence Script
;Header
desc = health bar hud
;Triggers
;Open Up Health Bar HUD Images
:state=0:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar100.dds,hudname=health,hudmake=display,hudsizex=400,hudsizey=75,state=1
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar97.dds,hudname=health1,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar95.dds,hudname=health2,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar92.dds,hudname=health3,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar89.dds,hudname=health4,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar87.dds,hudname=health5,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar84.dds,hudname=health6,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar81.dds,hudname=health7,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar79.dds,hudname=health8,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar76.dds,hudname=health9,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar73.dds,hudname=health10,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar71.dds,hudname=health11,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar68.dds,hudname=health12,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar65.dds,hudname=health13,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar62.dds,hudname=health14,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar60.dds,hudname=health15,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar57.dds,hudname=health16,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar55.dds,hudname=health17,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar52.dds,hudname=health18,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar49.dds,hudname=health19,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar47.dds,hudname=health20,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar44.dds,hudname=health21,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar41.dds,hudname=health22,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar39.dds,hudname=health23,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar36.dds,hudname=health24,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar34.dds,hudname=health25,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar31.dds,hudname=health26,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar28.dds,hudname=health27,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar26.dds,hudname=health28,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar23.dds,hudname=health29,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar20.dds,hudname=health30,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar18.dds,hudname=health31,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40
:state=1:hudreset,hudx=40,hudy=5,hudimagefine=gamecore\huds\healthbar15.dds,hudname=health32,hudhide=1,hudmake=display,hudsizex=400,hudsizey=40,state=10
;Bar Lose Health
:state=10,plrhealthless=101:hudshow=health,state=12
:state=10,plrhealthless=97:hudshow=health1,hudunshow=health,state=12
:state=10,plrhealthless=94:hudshow=health2,hudunshow=health1,state=12
:state=10,plrhealthless=91:hudshow=health3,hudunshow=health2,state=12
:state=10,plrhealthless=88:hudshow=health4,hudunshow=health3,state=12
:state=10,plrhealthless=85:hudshow=health5,hudunshow=health4,state=12
:state=10,plrhealthless=82:hudshow=health6,hudunshow=health5,state=12
:state=10,plrhealthless=79:hudshow=health7,hudunshow=health6,state=12
:state=10,plrhealthless=76:hudshow=health8,hudunshow=health7,state=12
:state=10,plrhealthless=73:hudshow=health9,hudunshow=health8,state=12
:state=10,plrhealthless=70:hudshow=health10,hudunshow=health9,state=12
:state=10,plrhealthless=67:hudshow=health11,hudunshow=health10,state=12
:state=10,plrhealthless=64:hudshow=health12,hudunshow=health11,state=12
:state=10,plrhealthless=61:hudshow=health13,hudunshow=health12,state=12
:state=10,plrhealthless=57:hudshow=health14,hudunshow=health13,state=12
:state=10,plrhealthless=54:hudshow=health15,hudunshow=health14,state=12
:state=10,plrhealthless=51:hudshow=health16,hudunshow=health15,state=12
:state=10,plrhealthless=48:hudshow=health17,hudunshow=health16,state=12
:state=10,plrhealthless=45:hudshow=health18,hudunshow=health17,state=12
:state=10,plrhealthless=42:hudshow=health19,hudunshow=health18,state=12
:state=10,plrhealthless=39:hudshow=health20,hudunshow=health19,state=12
:state=10,plrhealthless=36:hudshow=health21,hudunshow=health20,state=12
:state=10,plrhealthless=33:hudshow=health22,hudunshow=health21,state=12
:state=10,plrhealthless=30:hudshow=health23,hudunshow=health22,state=12
:state=10,plrhealthless=27:hudshow=health24,hudunshow=health23,state=12
:state=10,plrhealthless=24:hudshow=health25,hudunshow=health24,state=12
:state=10,plrhealthless=21:hudshow=health26,hudunshow=health25,state=12
:state=10,plrhealthless=18:hudshow=health27,hudunshow=health26,state=12
:state=10,plrhealthless=15:hudshow=health28,hudunshow=health27,state=12
:state=10,plrhealthless=12:hudshow=health29,hudunshow=health28,state=12
:state=10,plrhealthless=9:hudshow=health30,hudunshow=health29,state=12
:state=10,plrhealthless=6:hudshow=health31,hudunshow=health30,state=12
:state=10,plrhealthless=3:hudshow=health32,hudunshow=health31,state=12
:state=10,plrhealthless=1:hudshow=health,hudunshow=health32,state=12
;Health Bar Regeneration
:state=12,plrhealthgreater=99:hudshow=health,hundunshow=health1,state=10
:state=12,plrhealthgreater=97:hudshow=health1,hudunshow=health2,state=10
:state=12,plrhealthgreater=94:hudshow=health2,hudunshow=health3,state=10
:state=12,plrhealthgreater=91:hudshow=health3,hudunshow=health4,state=10
:state=12,plrhealthgreater=88:hudshow=health4,hudunshow=health5,state=10
:state=12,plrhealthgreater=85:hudshow=health5,hudunshow=health6,state=10
:state=12,plrhealthgreater=82:hudshow=health6,hudunshow=health7,state=10
:state=12,plrhealthgreater=79:hudshow=health7,hudunshow=health8,state=10
:state=12,plrhealthgreater=76:hudshow=health8,hudunshow=health9,state=10
:state=12,plrhealthgreater=73:hudshow=health9,hudunshow=health10,state=10
:state=12,plrhealthgreater=70:hudshow=health10,hudunshow=health11,state=10
:state=12,plrhealthgreater=67:hudshow=health11,hudunshow=health12,state=10
:state=12,plrhealthgreater=64:hudshow=health12,hudunshow=health13,state=10
:state=12,plrhealthgreater=61:hudshow=health13,hudunshow=health14,state=10
:state=12,plrhealthgreater=57:hudshow=health14,hudunshow=health15,state=10
:state=12,plrhealthgreater=54:hudshow=health15,hudunshow=health16,state=10
:state=12,plrhealthgreater=51:hudshow=health16,hudunshow=health17,state=10
:state=12,plrhealthgreater=48:hudshow=health17,hudunshow=health18,state=10
:state=12,plrhealthgreater=45:hudshow=health18,hudunshow=health19,state=10
:state=12,plrhealthgreater=42:hudshow=health19,hudunshow=health20,state=10
:state=12,plrhealthgreater=39:hudshow=health20,hudunshow=health21,state=10
:state=12,plrhealthgreater=36:hudshow=health21,hudunshow=health22,state=10
:state=12,plrhealthgreater=33:hudshow=health22,hudunshow=health23,state=10
:state=12,plrhealthgreater=30:hudshow=health23,hudunshow=health24,state=10
:state=12,plrhealthgreater=27:hudshow=health24,hudunshow=health25,state=10
:state=12,plrhealthgreater=24:hudshow=health25,hudunshow=health26,state=10
:state=12,plrhealthgreater=21:hudshow=health26,hudunshow=health27,state=10
:state=12,plrhealthgreater=18:hudshow=health27,hudunshow=health28,state=10
:state=12,plrhealthgreater=15:hudshow=health28,hudunshow=health29,state=10
:state=12,plrhealthgreater=12:hudshow=health29,hudunshow=health30,state=10
:state=12,plrhealthgreater=9:hudshow=health30,hudunshow=health31,state=10
:state=12,plrhealthgreater=6:hudshow=health31,hudunshow=health32,state=10
:state=12,plrhealthgreater=3:hudshow=health32,hudunshow=health33,state=10
;End of Script
Please excuse the messy numbering and values for the healthless/healthgreater's conditions. Any help is greatly appreciated
"I'm inspired by my own wise quotes, thank you." - Burger, 6/7/12