@The Nerd, The format of a line of FPI script is..
:{condition(s)}:{action(s)}
So (Similar to ctm's) something like:
:state=0,plrwithinzone=1:state=1
state is always zero when the script first runs so here we are checking that state=0 and the player is in the trigger zone, if both these conditions are true then we set the state to 1.
:state=1:ambience=5,state=2
This will only activate when the first line of the script is satisfied, when that happens the state veriable is set to 1. As soon as that happens the condition above is met so we run the command ambience=5 then set the state to 2. With out this the script will keep setting the ambience to 5 for ever more. Setting the state to 2 at the end will make the script stop runing as there is no state=2 conditions in the script.
Basicaly this is a trigger once only scenario i.e. once we have triggered the script via the trigger zone it will do it's code then finish. As we will never have the state being 0 again, it will never match the state=0,plrwithinzone=1 again.
If we wanted to make it a trigger that will activate once, every time we entered the zone you will need to change it to this:
:state=0,plrwithinzone=1:state=1
:state=1:ambience=5:state=2
:state=2,plrwithinzone=0:state=3
As you can see we have now added a state=2 condition so the script will now carry on. We have also added a new condition, plrwithinzone=0, which means the player must leave the zone before this line will activate.
:state=3:ambience=100,state=0
Once the player has left the zone, it will change that state to 3. And this line above will set the ambience light to 100% and will set the state back to 0. As the state is now 0 the script is still active waiting for the player to enter the trigger zone again.
The upshot of this script means that if the player enters the zone, it will get dark, and when they exit the zone it will get bright again.
Jas
----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"