Well considering I had programming experience before I started messing with FPI It wasn't hard for me to pick up.Took me 2 days to learn everything.I don't know about you,but I found this -
http://download.fpsfree.com/n79q24t66ks8/scripts/fpi_script.htmvery useful.Now about the entity situation I'll try to explain the best I can.
The entity's main script is used only on that entity.The states in that script are not valid in any other scripts.In other words if you change the state in a door's script to say state=3,that doesn't mean that the global state is changed,but only for the door.
Now about appear and destroy scripts.If I'm correct,they are executed only once,unlike main scripts.They're executed constantly.The appear script on an entity is to set its colission and make it visible.The disappear script can be different for each entity.You can choose to leave the corpse of a character on the map,or you can fade it.All the scripts are in the scriptbank\destroy folder.
Now there are functions that can affect the player from a distance.Say you put a main script on an entity(character) and he somehow has to determine whether you are near him or not.This is done by this command
plrdistwithin=x.This is a condition.Conditions are put between 2 colons(I think it's caled a colon lol) :plrdistwithin=300: translates to IF the player is within 300 units radius THEN after the second : happens something.So to get a result would require to write an
ACTION after the second colon.Example
:plrdistwithin=300:rotatetoplr.In this case the entity rotates to the player if he is within 300 units radius.
Now in your case with the safe.Just pretend it's a door.
:state=0,plrdistwithin=120:state=4
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistfurther=120:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0
:state=4,plrcanbeseen:state=1,setframe=0,sound=$0
:state=4,state=0
But this script wont help you much.Since it removes all collision from the entity.The part you need is with the opening of the door.So to explain what the script does :
First of all the change of the states is required because if you don't change a state then that line of code will be ran again and again and again...basically it's pointless.So you change the state after you set an action and then you keep it moving.Think checkpoints.Now everything else in the script is self-explanatory.
I guess you can use that script as long as you remove the collision actions and also you'll probably ask what sound=$1 and $0 is for.Those are the numbers of sound rows in the editor,when you right click on an entity.$1 is sound1 and $0 is sound0.That way it's easier to change it.You don't have to rewrite the script every time,just change the sounds for the entity you want.