Here is a backpack script for the Doctor's Backpack. It includes image huds, raw text and use of scancodekeypressed commands and more so that player can choose one of four items in his backpack. Also player can choose grabbing Nomad's flashlight. If you would like me to break it down for you. I would be glad to do it. It will take some time and if nobody is interested I'll just leave it as it stands. Actually, it would be useful for those who want to learn how to script FPI to try and follow it themselves first.
;Artificial Intelligence Script
;Header
desc = Retrieve backpack inventory by pressing B
;Triggers
:state=0:dimvar=haveflashlight,setvar=haveflashlight 0,dimvar=flon,setvar=flon 0
:state=0:holster=0
:state=0:fpgcrawtextsize=32,fpgcrawtextfont=comic sans ms
:state=0:fpgcrawtextr=128,fpgcrawtextg=128,fpgcrawtextb=255
:state=0:fpgcrawtextx=50,fpgcrawtexty=90
:state=0:hudreset,hudx=50,hudy=15,hudimagefine=gamecore\huds\My Huds\doc_backpack.png,hudname=CoreInv,hudlayer=3,hudhide=1,hudmake=display
:state=0:hudreset,hudx=36,hudy=18.75,hudimagefine=gamecore\huds\My Huds\Sonic_icon_blue1.png,hudname=RPWblue,hudlayer=4,hudhide=1,hudmake=display
:state=0:hudreset,hudx=43.90,hudy=18.70,hudimagefine=gamecore\huds\My Huds\Sonic_icon_green.png,hudname=RPWgreen,hudlayer=4,hudhide=1,hudmake=display
:state=0:hudreset,hudx=51.25,hudy=18.70,hudimagefine=gamecore\huds\My Huds\Sonic_icon_red.png,hudname=RPWred,hudlayer=4,hudhide=1,hudmake=display
:state=0:hudreset,hudx=61.25,hudy=19.25,hudimagefine=gamecore\huds\My Huds\gauntlet_larger.png,hudname=gauntlet,hudlayer=4,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\My Huds\Inventory_full.dds,hudname=FullInv,hudlayer=3,hudhide=1,hudmake=display,state=1
:state=1,varequal=haveflashlight 1,mousestate=1,varequal=flon 0:plrsound=audiobank\flashlight\onoff.wav,soundscale=100,setvar=flon 1
:state=1,varequal=haveflashlight 1,mousestate=0,varequal=flon 1:plrsound=audiobank\flashlight\onoff.wav,soundscale=100,setvar=flon 0
:state=1,scancodekeypressed=33:state=50,etimerstart,holster=1
:state=1,scancodekeypressed=19:etimerstart,state=30,holster=1
:state=1,scancodekeypressed=48,varequal=haveflashlight 0:hudshow=CoreInv,hudshow=RPWgreen,hudshow=RPWblue,hudshow=RPWred,hudshow=gauntlet,state=2,etimerstart,plrdisable=100000,holster=1
:state=1,scancodekeypressed=23,varequal=haveflashlight 0:state=100,etimerstart,holster=1
:state=2,etimergreater=350:state=3
:state=3,scancodekeypressed=48:hudunshow=CoreInv,hudunshow=RPWblue,hudunshow=RPWgreen,hudunshow=RPWblue,hudunshow=RPWred,hudunshow=gauntlet,etimerstart,state=4
:state=3,scancodekeypressed=79:removecurrentweapon,etimerstart,state=5
:state=3,scancodekeypressed=80:removecurrentweapon,etimerstart,state=6
:state=3,scancodekeypressed=81:removecurrentweapon,etimerstart,state=7
:state=3,scancodekeypressed=75:removecurrentweapon,etimerstart,state=8
:state=4,etimergreater=350:state=1,holster=1,plrdisable=0
:state=5,etimergreater=350:getcinematichands=SonicScrewdriverBlue DrWho_Sonic_DB,state=10,etimerstart
:state=6,etimergreater=350:getcinematichands=SonicScrewdriverGreen DrWho_Sonic_DG,state=10,etimerstart
:state=7,etimergreater=350:getcinematichands=SonicScrewdriverRed DrWho_Sonic_DR,state=10,etimerstart
:state=8,etimergreater=350:getcinematichands=Gauntlet EAI_FANTASY\SPELLRAY2F,state=10,etimerstart
:state=10,etimergreater=250:state=15,etimerstart
:state=15,etimergreater=250:state=16
:state=16:fpgcrawtext="Press [K] to keep or press [R] to remove."
:state=16,scancodekeypressed=19:removecurrentweapon,state=3,etimerstart,soundscale=0
:state=16,scancodekeypressed=37:etimerstart,state=20
;,showplrweapon
:state=20,etimergreater=250:plrdisable=0,hudunshow=CoreInv,hudunshow=RPWblue,hudunshow=RPWgreen,hudunshow=RPWblue,hudunshow=RPWred,hudunshow=gauntlet,etimerstart,state=25
:state=25,etimergreater=150:state=1,etimerstart
;:state=25,etimergreater=250:showplrweapon,state=1
:state=30,etimergreater=150:removecurrentweapon,state=0
:state=50,Haveweapright=1,varequal=haveflashlight 0:state=1
:state=50,weaponinslot=1,varequal=haveflashlight 0:state=1
:state=50,varequal=haveflashlight 1:removecurrentweapon,etimerstart,state=55
:state=50,varequal=haveflashlight 0,etimergreater=350:getcinematichands=Flashlight nomad\flashlight,state=1,setvar=haveflashlight 1,holster=0
:state=55,etimergreater=150:setvar=haveflashlight 0,state=1,holster=1
:state=100,etimergreater=200:hudshow=FullInv,state=120,etimerstart
:state=120,etimergreater=150:none
;End of Script
THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why.
For me, theory and practice are combined: nothing works and I don't know why.