Sorry to bring this topic back on track, guys.
Quote: "thanks CE and would this work in 1.07 with ply's mod?"
I made a Body Armor script for Ply's Mod a while ago. For recap, here it is.
;Artificial Intelligence Script
;Header
desc = Armor Script, by Plystire (Requires Ply's Mod V1.05+)
;Triggers
:state=0:dimvar=PlrHealth,dimvar=PlrArmor,setvar=PlrArmor 100,dimvar=Temp,state=1
:vargreater=PlrHealth $PH,vargreater=PlrArmor 0:setvar=Temp %PlrHealth,subvar=Temp $PH,plraddhealth=%Temp
:vargreater=Temp 0:subvar=PlrArmor %Temp,setvar=Temp 0,etimerstart
:varless=PlrArmor 0:setvar=PlrArmor 0
:etimergreater=5000,varless=PlrArmor 100:addvar=PlrArmor 1
:ALWAYS:setvar=PlrHealth $PH
;End of Script
Just slap that script onto a triggerzone or dynamic light in your level (The triggerzone does not need to be bigger than a single segment) and TADA, you have regenerating Armor.
Rules for the Armor:
- Armor will absorb 100 damage for the player
- Armor will prevent ALL damage done to the player until Armor value reaches 0
- For Armor to regenerate, Player must NOT recieve damage for 5 seconds
This script will not create a HUD for keeping track of the armor value. If you'd like a numeric HUD to view the Armor's value, remove the "state=0" line and add these two lines in it's place:
:state=0:dimvar=PlrHealth,dimvar=PlrArmor,setvar=PlrArmor 100,dimvar=Temp
:state=0:hudreset,hudx=24,hudy=8,hudsizex=16,hudsizey=16,hudimage=gamecorehudsnumeric2.tga,hudname=PlrArmorNum,hudtype=6,huduservar=PlrArmor,hudmake=numeric,state=1
That will show anothr numeric at the top of the screen that keeps track of your Armor.
The one and only,