As posted here
we have a quite sophisticated Damage / Sanity / Critical Hits system created for "Into the Dark" that consists of 3 scripts in total. However, the basic Damage system works also on its own and you can feel free to use it. (free for comemrcial, noncommercial, I dont care and wish you the best)
Please read the commented parts as they tell you how to prepare the assets.
;Artificial Intelligence Script
;Header
desc = Enhanced Damage Script "Into The Dark"
;Preparing the HUDs
;Note: You have to create 10 different damage HUDS going from slight damage (1.png) to death damage (10.png) 1024*768, PNG recommended!
;For best visual effect, prepare the higher damage levels on base of the lower ones
;Example: make small scratch and save as 1.png. Ad a second scratch and some drops and save as 2.png and so on...
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\1.png,hudname=1,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\2.png,hudname=2,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\3.png,hudname=3,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\4.png,hudname=4,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\5.png,hudname=5,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\6.png,hudname=6,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\7.png,hudname=7,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\8.png,hudname=8,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\9.png,hudname=9,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\dmg\10.png,hudname=10,hudhide=1,hudmake=display,etimerstart,state=1
;Failsafe timer for initialzing on level start
:state=1,etimergreater=1500:state=2
:state=5:state=2
; cheking health and showing
:state=2,PLRHEALTHGREATER=0:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudshow=10,PLRWOBBLE=100
:state=2,PLRHEALTHGREATER=1:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudshow=9,hudunshow=10,PLRWOBBLE=90
:state=2,PLRHEALTHGREATER=10:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=80
:state=2,PLRHEALTHGREATER=20:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=70
:state=2,PLRHEALTHGREATER=30:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=60
:state=2,PLRHEALTHGREATER=40:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=50
:state=2,PLRHEALTHGREATER=50:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=40
:state=2,PLRHEALTHGREATER=60:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=30
:state=2,PLRHEALTHGREATER=70:hudunshow=0,hudunshow=1,hudunshow=2,hudshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=20
:state=2,PLRHEALTHGREATER=80:hudunshow=0,hudunshow=1,hudshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=10
:state=2,PLRHEALTHGREATER=90:hudunshow=0,hudshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=5
:state=2,PLRHEALTHGREATER=99:hudunshow=0,hudunshow=1,hudunshow=2,hudunshow=3,hudunshow=4,hudunshow=5,hudunshow=6,hudunshow=7,hudunshow=8,hudunshow=9,hudunshow=10,PLRWOBBLE=0
; triggering "You are close to death effect"
:state=2,PLRHEALTHLESS=25:state=3
; sending around for script stability
:state=2:state=5
; "You are close to death"
; Note: insert your own sound with 2,5 seconds lenght and looping
:state=3:setposteffect=motionsickness,plrsound=audiobank\voices\Pete\heart4.ogg,etimerstart,state=4
:state=4,etimergreater=2500:setposteffect=bloom,state=2
;End of Script