Hello! I am fairly new to scripting. (Kinda) So, I was hoping someone could help me out here.
I'm trying to make the HUD health image change based on the player's HP. I placed the following code in the setuplevel.fpi script... Please take a look:
:state=0,plrhealthgreater=90:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health10.png,hudmake=display
:state=0,plrhealthless=91:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health9.png,hudmake=display
:state=0,plrhealthless=81:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health8.png,hudmake=display
:state=0,plrhealthless=71:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health7.png,hudmake=display
:state=0,plrhealthless=61:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health6.png,hudmake=display
:state=0,plrhealthless=51:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health5.png,hudmake=display
:state=0,plrhealthless=41:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health4.png,hudmake=display
:state=0,plrhealthless=31:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health3.png,hudmake=display
:state=0,plrhealthless=21:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health2.png,hudmake=display
:state=0,plrhealthless=11:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health1.png,hudmake=display
:state=0,plrhealthless=1:hudreset,hudx=10,hudy=90,hudimage=languagebank\english\gamecore\huds\health0.png,hudmake=display
The image should be gradually changing as the player's health lowers and rises, but it's not working for me.
I'm sure there is a simple way to accomplish this. This script just gets stuck displaying the first HUD image, and no matter what the player's health is reduced to, it never changes.
Let me know what I'm doing wrong!! Bah. It's infuriating.