New bridge script to go with a lever that Lafette sent me.
Basically the name of the entities control the function:
In the video the switches are called "bridgeswitch1,A" and the bridge bed entity is called "bridge1_bed,A,5".
Note the comma separated values, these are the 'parameters' for the script.
first parameter is A which tells the script which bridge the switch operates, so in the video you can see both switches operate the same bridge. If you don't give this parameter then the closest bridge to the switch will be operated by it.
second parameter is the delay before the bridge closes in seconds. Setting this to less than 1 will make the bridge control 'open' and 'close' via the switch and any positive value over 1 will make the bridge close again after that number of seconds. If you don't give this parameter then a default of 30 seconds is set.
A third parameter can be given which is the speed of operation, defaults to 0.1, this parameter allows you to tweak the bridge opening speed to the length of the sound of opening.
Another more subtle change to this script is that the speed of the bridge will adjust automatically for changes in FPS, it is important for this reason that all entities are set always active=yes.
Been there, done that, got all the T-Shirts!