So I tried combinig these two simple scripts togeter, but managed to mess up the whole thing.
Here are the scipts:
Battery for flash light:
;Artificial Intelligence Script
;battery for Flahlight script
;Header
desc = battery for flashlight made by hockeykid
;Triggers
:state=0,always:globalvar=90
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:setvar=23,state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=itemprompt,hudfadeout=itemprompt
:state=1:rundecal=5
And pick up script:
;Artificial Intelligence Script
;Header
desc = Weapon Pickup
;Triggers:
:state=0:hudreset,hudx=50,hudy=90,hudsize=40,hudtext= pick up "E",hudname=Coltprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:hudshow=coltprompt,state=12
:state=12,plrdistfurther=40:hudunshow=coltprompt,state=12,state=10
:state=12,scancodekeypressed=18:hudunshow=coltprompt,playertake,coloff,rundecal=-1,plrsound=audiobankitemspickupweapon.wav,state=14
;End of Script
So what I wanted was that you need to press E to pick up the battery, not the automatic pick up like it is as default. It would be to annoying in the game as you accidentally pick up and waste battery when it's already full.
If someone is interested to help me combining these scripts like you need to push a button and it would still work as intented i would be more than happy. And of course get your name in the credits in Flashlight field.
Oh, and if the original Flashlight script is needet, here it is:
;Artificial Intelligence Script
;Flahlight script
;Header
desc = flashlight s4real fog edit by game freak16 and edited by:(SEF)DEATH
;Triggers
;==============================================================================================================================================================
;Hud's to show.
;==============================================================================================================================================================
:state=0,always:globalvar=90,setvar=1
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\text\flash.dds,hudname=flash,hudhide=1,hudmake=display,state=9
:state=9:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\1.tag,hudname=1,hudhide=1,hudmake=display,state=10
:state=10:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\2.tag,hudname=2,hudhide=1,hudmake=display,state=11
:state=11:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\3.tag,hudname=3,hudhide=1,hudmake=display,state=12
:state=12:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\4.tag,hudname=4,hudhide=1,hudmake=display,state=13
:state=13:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\5.tag,hudname=5,hudhide=1,hudmake=display,state=14
:state=14:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\6.tag,hudname=6,hudhide=1,hudmake=display,state=15
:state=15:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\7.tag,hudname=7,hudhide=1,hudmake=display,state=16
:state=16:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\8.tag,hudname=8,hudhide=1,hudmake=display,state=17
:state=17:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\9.tag,hudname=9,hudhide=1,hudmake=display,state=18
:state=18:hudreset,hudx=11,hudy=90,hudimagefine=gamecore\text\flashlightv3\10.tag,hudname=10,hudhide=1,hudmake=display,state=1
:state=1,scancodekeypressed=33:hudshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=50,timerstart,fog=1,fogred=5,fogblue=5,foggreen=5,state=2
:state=50,scancodekeypressed=33:hudshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=50,timerstart,fog=1,fogred=5,fogblue=5,foggreen=5,state=2
:state=2,varequal=1,scancodekeypressed=0:hudshow=1,state=3
:state=2,varequal=2,scancodekeypressed=0:hudshow=1,state=30
:state=2,varequal=3,scancodekeypressed=0:hudshow=2,state=31
:state=2,varequal=4,scancodekeypressed=0:hudshow=2,state=32
:state=2,varequal=5,scancodekeypressed=0:hudshow=3,state=33
:state=2,varequal=6,scancodekeypressed=0:hudshow=3,state=34
:state=2,varequal=7,scancodekeypressed=0:hudshow=4,state=35
:state=2,varequal=8,scancodekeypressed=0:hudshow=4,state=36
:state=2,varequal=9,scancodekeypressed=0:hudshow=5,state=37
:state=2,varequal=10,scancodekeypressed=0:hudshow=5,state=38
:state=2,varequal=11,scancodekeypressed=0:hudshow=6,state=39
:state=2,varequal=12,scancodekeypressed=0:hudshow=6,state=40
:state=2,varequal=13,scancodekeypressed=0:hudshow=7,state=41
:state=2,varequal=14,scancodekeypressed=0:hudshow=7,state=42
:state=2,varequal=15,scancodekeypressed=0:hudshow=8,state=43
:state=2,varequal=16,scancodekeypressed=0:hudshow=8,state=44
:state=2,varequal=17,scancodekeypressed=0:hudshow=9,state=45
:state=2,varequal=18,scancodekeypressed=0:hudshow=9,state=46
:state=2,varequal=19,scancodekeypressed=0:hudshow=10,state=47
:state=2,varequal=20,scancodekeypressed=0:hudshow=10,state=48
;==============================================================================================================================================================
;Hud timers
;==============================================================================================================================================================
:state=3,timergreater=1:hudshow=1,setvar=2,state=30
:state=30,timergreater=4000:hudunshow=1,setvar=3,state=31
:state=31,timergreater=4000:hudshow=2,setvar=4,timerstart,state=32
:state=32,timergreater=4000:hudunshow=2,setvar=5,state=33
:state=33,timergreater=4000:hudshow=3,setvar=6,timerstart,state=34
:state=34,timergreater=4000:hudunshow=3,setvar=7,state=35
:state=35,timergreater=4000:hudshow=4,setvar=8,timerstart,state=36
:state=36,timergreater=4000:hudunshow=4,setvar=9,state=37
:state=37,timergreater=4000:hudshow=5,setvar=10,timerstart,state=38
:state=38,timergreater=4000:hudunshow=5,setvar=11,state=39
:state=39,timergreater=4000:hudshow=6,setvar=12,timerstart,state=40
:state=40,timergreater=4000:hudunshow=6,setvar=13,state=41
:state=41,timergreater=4000:hudshow=7,setvar=14,timerstart,state=42
:state=42,timergreater=4000:hudunshow=7,setvar=15,state=43
:state=43,timergreater=4000:hudshow=8,setvar=16,timerstart,state=44
:state=44,timergreater=4000:hudunshow=8,setvar=17,state=45
:state=45,timergreater=4000:hudshow=9,setvar=18,timerstart,state=46
:state=46,timergreater=4000:hudunshow=9,setvar=19,state=47
:state=47,timergreater=4000:hudshow=10,setvar=20,timerstart,state=48
:state=48,timergreater=4000:hudunshow=10,setvar=21,state=49
:state=49,timergreater=4000:setvar=22,hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,fog=0,fogred=0,fogblue=0,foggreen=0,state=5
;==============================================================================================================================================================
;Huds to unshow when the key is pressed
;==============================================================================================================================================================
:state=3,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=30,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=31,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=32,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=33,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=34,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=35,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=36,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=37,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=38,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=39,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=40,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=41,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=42,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=43,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=44,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=45,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=46,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=47,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=48,scancodekeypressed=33:hudunshow=flash,sound=audiobank\flashswitch\flash.ogg,ambience=5,state=4,fog=0,fogred=0,fogblue=0,foggreen=0
:state=4:hudunshow=1
:state=4:hudunshow=2
:state=4:hudunshow=3
:state=4:hudunshow=4
:state=4:hudunshow=5
:state=4:hudunshow=6
:state=4:hudunshow=7
:state=4:hudunshow=8
:state=4:hudunshow=9
:state=4:hudunshow=10
:state=4,scancodekeypressed=0:state=50
:varequal=23:setvar=1,timerstart,state=2
:state=5,varequal=23:state=0
;End of Script
Thanks
Jonez