Hello Forum,
A while back I created a quasi animated health hud
When the player takes damage the hud reacts like this
I edited the Setuplevel.fpi like this
;AIScript from Wizard
;Header
desc = Setup Wizard
; Setup Level Stats
:state=0:sky=skybank\natural\ngt
:state=0:music=audiobank\music\generic\main.wav,musicvolume=50,soundscale=25
:state=0:fog=0,fogred=0,foggreen=0,fogblue=0
:state=0:ambience=0,ambiencered=0,ambiencegreen=0,ambienceblue=0
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health1.tga,hudname=health1,hudmake=display,hudhide=1
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health2.tga,hudname=health2,hudmake=display,hudhide=1
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health3.tga,hudname=health3,hudmake=display,hudhide=1
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health4.tga,hudname=health4,hudmake=display,hudhide=1
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health5.tga,hudname=health5,hudmake=display,hudhide=1
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health6.tga,hudname=health6,hudmake=display,hudhide=1
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health7.tga,hudname=health7,hudmake=display,hudhide=1
:state=0:hudreset,hudx=15,hudy=90,hudimage=gamecore\huds\health8.tga,hudname=health8,hudmake=display,hudhide=1
:state=0:hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore\huds\fader.tga,hudhide=1,hudtype=3,hudmake=internal
:state=0:hudreset,hudx=50,hudy=50,hudred=128,hudgreen=128,hudblue=128,hudsizex=1024,hudsizey=768,hudimage=gamecore\huds\zoom.tga,hudhide=1,hudtype=4,hudmake=internal
:state=0:hudreset,hudx=5,hudy=5,hudimage=languagebank\english\gamecore\huds\lives.tga,hudtype=1,hudmake=display
:state=0:hudreset,hudx=4,hudy=8,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=1,hudmake=numeric
:state=0:hudreset,hudx=85,hudy=8,hudimage=gamecore\huds\ammo.tga,hudtype=3,hudmake=status
:state=0:hudreset,hudx=88,hudy=12,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=3,hudmake=numeric
; Setup Game Menu
:state=0:hudreset,hudx=50,hudy=10,hudimage=languagebank\english\gamecore\backdrops\basic\gamemenu.tga,hudname=gamemenutitle,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=40,hudimage=languagebank\english\gamecore\backdrops\basic\loadgame.tga,hudtype=2,hudname=loadgame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=50,hudy=50,hudimage=languagebank\english\gamecore\backdrops\basic\savegame.tga,hudtype=3,hudname=savegame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=50,hudy=60,hudimage=languagebank\english\gamecore\backdrops\basic\exitgame.tga,hudtype=5,hudname=quitgame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=50,hudy=70,hudimage=languagebank\english\gamecore\backdrops\basic\returntogame.tga,hudtype=4,hudname=returngame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=50,hudy=50,hudimage=gamecore\huds\pointer.tga,hudname=pointer,hudhide=1,hudmake=pointer
:state=0:state=1
; Main Game
; Head Controler
:state=1,plrhealthgreater=499:hudreset,hudshow=health1,hudunshow=health2,hudunshow=health3,hudunshow=health4,hudunshow=health5,hudunshow=health6,hudunshow=health7,hudunshow=health8
:state=1,plrhealthless=500,plrhealthgreater=400:hudreset,hudunshow=health1,hudshow=health2,hudunshow=health3,hudunshow=health4,hudunshow=health5,hudunshow=health6,hudunshow=health7,hudunshow=health8
:state=1,plrhealthless=400,plrhealthgreater=300:hudreset,hudunshow=health1,hudunshow=health2,hudshow=health3,hudunshow=health4,hudunshow=health5,hudunshow=health6,hudunshow=health7,hudunshow=health8
:state=1,plrhealthless=250,plrhealthgreater=200:hudreset,hudunshow=health1,hudunshow=health2,hudunshow=health3,hudshow=health4,hudunshow=health5,hudunshow=health6,hudunshow=health7,hudunshow=health8
:state=1,plrhealthless=200,plrhealthgreater=150:hudreset,hudunshow=health1,hudunshow=health2,hudunshow=health3,hudunshow=health4,hudshow=health5,hudunshow=health6,hudunshow=health7,hudunshow=health8
:state=1,plrhealthless=150,plrhealthgreater=100:hudreset,hudunshow=health1,hudunshow=health2,hudunshow=health3,hudunshow=health4,hudunshow=health5,hudshow=health6,hudunshow=health7,hudunshow=health8
:state=1,plrhealthless=100,plrhealthgreater=50:hudreset,hudunshow=health1,hudunshow=health2,hudunshow=health3,hudunshow=health4,hudunshow=health5,hudunshow=health6,hudshow=health7,hudunshow=health8
:state=1,plrhealthless=1:hudreset,hudunshow=health1,hudunshow=health2,hudunshow=health3,hudunshow=health4,hudunshow=health5,hudunshow=health6,hudunshow=health7,hudshow=health8
:state=1,escapekeypressed=1:pausegame,state=2
:state=1,scancodekeypressed=197:pausegame,state=11
:state=1,scancodekeypressed=64:hudshow=savingprompt,quicksavegame,pausegame,state=21
:state=1,scancodekeypressed=67:quickloadgame,state=31
:state=11,scancodekeypressed=0:state=12
:state=12,scancodekeypressed=197:resumegame,state=13
:state=13,scancodekeypressed=0:state=1
:state=21,scancodekeypressed=0:hudunshow=savingprompt,resumegame,state=1
:state=31,scancodekeypressed=0:state=1
; Game Menu
:state=2,escapekeypressed=0:state=3
:state=3:hudshow=gamemenutitle,hudshow=loadgame,hudshow=savegame,hudshow=quitgame,hudshow=returngame,hudshow=pointer,state=4
:state=4,hudselectionmade=2:loadgame
:state=4,hudselectionmade=3:savegame,state=6
:state=4,hudselectionmade=5:continuegame,destroy
:state=4,hudselectionmade=4:state=6
:state=4,escapekeypressed=1:state=5
:state=5,escapekeypressed=0:state=6
:state=6:hudunshow=gamemenutitle,hudunshow=loadgame,hudunshow=savegame,hudunshow=quitgame,hudunshow=returngame,hudunshow=pointer,resumegame,state=1
Now I can't seem to figure out how to add green back to the health hud when the player picks up a health pack. I haven't tried anything as far as scripting something, because i can't figure out where to put any script I would write. Do I edit the setuplevel? I have a feeling that it needs to be done with variables, which I suck at. Actually they scare me. Can't seem to wrap my head around them. Do I edit the med pack to display a hud with the regenerated health? When I looked at the condition Action lists I was hoping to find an ifhealthadded condition or something along those lines.
Any thoughts, it's gotta be simple and I am jsut missing it.