Heres a script that decreases the players speed as his health drops
;Artificial Intelligence Script
;Header
desc =Plr Speed Decreases as Health Drains
;Triggers
:plrhealthless=230:setplrspeedmod=75 %
:plrhealthless=210:setplrspeedmod=70 %
:plrhealthless=190:setplrspeedmod=65 %
:plrhealthless=170:setplrspeedmod=60 %
:plrhealthless=150:setplrspeedmod=55 %
:plrhealthless=130:setplrspeedmod=50 %
:plrhealthless=110:setplrspeedmod=45 %
:plrhealthless=90:setplrspeedmod=40 %
:plrhealthless=70:setplrspeedmod=35 %
:plrhealthless=50:setplrspeedmod=30 %
:plrhealthless=30:setplrspeedmod=20 %
:plrhealthless=10:setplrspeedmod=10 %
:plrhealthless=11:setplrspeedmod=20 %
:plrhealthgreater=31:setplrspeedmod=30 %
:plrhealthgreater=51:setplrspeedmod=35 %
:plrhealthgreater=71:setplrspeedmod=40 %
:plrhealthgreater=91:setplrspeedmod=45 %
:plrhealthgreater=111:setplrspeedmod=50 %
:plrhealthgreater=131:setplrspeedmod=55 %
:plrhealthgreater=151:setplrspeedmod=60 %
:plrhealthgreater=171:setplrspeedmod=65 %
:plrhealthgreater=191:setplrspeedmod=70 %
:plrhealthgreater=211:setplrspeedmod=75 %
:plrhealthgreater=231:setplrspeedmod=80 %
Apply it to a trigger zone, of course you can adjust it to suit your needs. Credit to 2beastmode4u for helping me when I was stuck.
Edit
Heres a couple flashlight scripts. I pretty new to scripting, and I'm sure some of these are could be simpler. Any way Here they are.
Flashlight goes out after certain amouunt of time(can be activated after going out)
;Artificial Intelligence Script
;Header
desc = Flashlight goes each time activated every 4 secs(must turn it off when it goes out before re-activating)
;Triggers
:state=0,scancodekeypressed=33:flashlighton,flashlightrange=200,flashlightred=190,flashlightgreen=190,flashlightblue=202,state=1
:state=1:etimerstart,state=2
:state=2,etimergreater=4000:state=3,flashlightoff,state=4
:state=4,scancodekeypressed=0:state=5
:state=5,scancodekeypressed=34:flashlightoff,state=6
:state=6,scancodekeypressed=0:state=0
Flashlight goes after certain amount of time and must wait a certain amount of tiem before turning it back on
;Artificial Intelligence Script
;Header
desc = Flashlight goes out each time activated every 4 secs and must wait 20secs to reactivate(must turn it off when it goes out before re-activating)
;Triggers
:state=0,scancodekeypressed=33:flashlighton,flashlightrange=200,flashlightred=190,flashlightgreen=190,flashlightblue=202,state=1
:state=1:etimerstart,state=2
:state=2,etimergreater=4000:state=3,flashlightoff,state=4
:state=4,scancodekeypressed=0:state=5
:state=5,scancodekeypressed=34:flashlightoff,state=6
:state=6,scancodekeypressed=0:state=7
:state=7:etimerstart,state=8
:state=8,etimergreater=20000:state=9
:state=9:plrdisable=1,state=10
:state=10,scancodekeypressed=33:flashlighton,state=0
Flashlight flickers on everytime activated
;Artificial Intelligence Script
;Header
desc = Flashlight flickers on everytime activated
;Triggers
:state=0,scancodekeypressed=33:flashlighton,flashlightrange=200,flashlightred=190,flashlightgreen=190,flashlightblue=202,state=1
:state=1:etimerstart,state=2
:state=2,etimergreater=200:state=3,flashlightoff,state=4,etimerstart,state=5
:state=5,etimergreater=200:state=6,flashlighton,state=7,etimerstart,state=8
:state=8,etimergreater=100:state=9,flashlightoff,state=10,etimerstart,state=11
:state=11,etimergreater=100:state=12,flashlighton,state=13,etimerstart,state=14
:state=14,etimergreater=200:state=15,flashlightoff,state=16,etimerstart,state=17
:state=17,etimergreater=200:state=18,flashlighton,state=19
:state=19,scancodekeypressed=0:state=20
:state=20,scancodekeypressed=34:flashlightoff,state=21
:state=21,scancodekeypressed=0:state=0
Flashlight flickers on only first time activated
;Artificial Intelligence Script
;Header
desc =Flashlight flickers only once when activated
;Triggers
:state=0,scancodekeypressed=33:flashlighton,flashlightrange=200,flashlightred=190,flashlightgreen=190,flashlightblue=202,state=1
:state=1:etimerstart,state=2
:state=2,etimergreater=200:state=3,flashlightoff,state=4,etimerstart,state=5
:state=5,etimergreater=200:state=6,flashlighton,state=7,etimerstart,state=8
:state=8,etimergreater=100:state=9,flashlightoff,state=10,etimerstart,state=11
:state=11,etimergreater=100:state=12,flashlighton,state=13,etimerstart,state=14
:state=14,etimergreater=200:state=15,flashlightoff,state=16,etimerstart,state=17
:state=17,etimergreater=200:state=18,flashlighton,state=19
:state=19,scancodekeypressed=0:state=20
:state=20,scancodekeypressed=34:flashlightoff,state=21
:state=21,scancodekeypressed=0:state=22
:state=22,scancodekeypressed=33:flashlighton,state=20
The flashlights are set up for the "F" key to turn it on and the "G" key to turn it off. Just change the scancodes to use different keys. These can be applied to a trigger zone and run all the time. But You can fake a pickup by apllying the script to an entity(as low poly as possible with a transparent texture),and spawn it with a trigger zone.
These arent the best scripts but I hope there usefull to somebody.
I recently learned to sleep with my eyes open. ..... God am I tired