Quote: "I imagine the flashlight script would work but I have to have a way to pick up the torch first before I could actually use it. The flashlight script will not allow the player to pick up the torch. Can somebody incorporate the pickup script into the flashlight script? (or show me how)"
You can do it the following way:
1. Place your torch entity. Assign the pickup script to it and in the If Used field put the name of a trigger (ex: flashlight_control). The pickup script should contain something like the following:
;Artificial Intelligence Script
;Header
desc = Pickup Item
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,playertake,activateifused=1,coloff,plrsound=audiobank\misc\ping.wav,hudshow=itemprompt,hudfadeout=itemprompt
:state=1:rundecal=5
;End of Script
Notice in the above pickup script I have the command
activateifused=1 which will activate the item specified in the If Used field of the entity.
2. Place a trigger close by where you put the torch. It does not need to be over top of the torch, but somewhere close where the player would pick it up. It can even be behind a nearby wall. Assign the main script to the flashlight script you use and assign the following "appearifactivate.fpi" script to the trigger start script. Make sure the name of the trigger
matches the name you assigned in the If Used field of the torch.
;Artificial Intelligence Script
;Header
desc = Instant On
;Triggers
:state=0,activated=1:spawnon,setalphafade=100,runfpidefault=1
;End of Script
The player picks up the torch which will spawn the trigger that runs the flashlight script.
There's no problem that can't be solved without applying a little scripting.