This compiled LScript calculates the changes in acceleration (for position and rotation) of the item it has been applied to. The information that is calculated is stored as a series of variables at a named location in memory that can be accessed by other plugins. It is used for handling the animation of the thruster jets.
This Plugin is part of a two plugin suite that comprises of a master script and a slave script. In its current version, the system will only function correctly if the master script is lower in the object order than any slave script. That is to say, slave scripts should only be applied to objects that are either children of the master scripts object or objects which were loaded into layout after the master scripts object. Loading the scripts the other way round can lead to unexpected results. ThrusterMAIN is the Master script.
Apply the plugin to the object you wish to measure (the control object). In the options panel to the plugin are a series of control values. a more detailed explanation of their function is found in the "how it works" section.
The default settings should be fine for most situations, the sensitivity values limit the maximum and minimum accelerations measured. The value is used as a cut off point for positive and negative values. All accelerations in excess of the limit are regarded as maximum/minimum (depending on the sign). Values within the range are converted to a parametric form (0 to +/-1). The limit values can be regarded as the sensitivity of the system.
Proactive acceleration pre-empts the motion by the number of frames set in the reaction speed input field. Un-tick the selection to use reactive acceleration which lags the motion by the number of frames set in the reaction speed input field.
If you are animating to 30fps then this button might be of use to you the default is a 25 frames per second (see; How it works).
Disable all jets does exactly as it says. All ThrusterJET scripts in the scene are disabled. To inform you of what has happened the title of all scripts changes to indicate that they have been globally disabled.
The plugin looks at the "objects" position and rotation over three time intivals of 0.04 or 0.033333 seconds (1/25th or 1/30th of a second), this is refered to as the comparison window. The comparison window is offset either forwards or backwards by a number of frames equal to the reaction speed. Proactive acceleration pre-empt the motion by n frames and can be used to drive (rocket thrusters). Reactive acceleration values lag behind by n frames and can be used for things like vehicle suspension systems.
The plugin calculates the relative change in state (acceleration) of the object based on its positions in the comparison window. a value in the range of +n,0,-n.
This change in state is then modified by the orientation of the object to give the amount of acceleration in each axis. Finaly these results are modified by the sensitvity settings to get them into parametric forms (+1 0 -1).
The "positional sensitivity (M per frame)" limits the maximum and minimum of the acceleration in the local X Y Z axis. If the limit is exceeded the acceleration is set to the relevant limit (maximum/minimum).
The "Rotational sensitivity (Deg per frame)" limits the maximum and minimum of the acceleration in the global H P B axis. If the limit is exceeded the acceleration is set to the relevant limit (maximum/minimum).
The plugin stores this information in a pre determined manor to be accessed by any number of slave scripts. The information is updated on a frame by frame basis in the object load order.
Because calculation requires previous frames or the next frame. The plug-in will not be able to provide any calculation for frame 0 (proactive) or frame 0 and 1 (reactive). So you should allow a lead in/out. The lead in should be as many frames as reaction speed +1frame (reactive). Additionally, If you are using the proactive setting the plug-in needs to look ahead by n frames so ensure that there is a keyframe (reaction speed +1frame) beyond your end frame or your last frame will not work properly.
Due to the nature of the information broadcasting used in this system it will only work correctly with one instance of the main plug-in. As multiple instances will over write each others information.
The object the main plug-in is attached to must appear before the objects any sub-scripts are attached to in the "selected item list" because LW goes through this list one item at a time the main script will not activate until its turn. If a sub-script is looking for broadcast information before it is posted (first frame) an error will occur and the scripts may not function.
Ensure you are using the latest versions of the Lscript plugins (v1.4.7 as of June 1999). They can be downloaded from http://www.lightwave-outpost.com/employees/bobh/
These scripts are provided for amusement purposes and as such, support (if any) will be limited to my spare time input only. I will do what I can but cannot be held accountable.
These scripts have been written with LScript v1.4.2 to run in LW 5.6. They will not function with an earlier version of LScript. However they will work with LW 5.5 if version 1.4.2 (or newer) of the LScript plugins have been installed these include lsc-lw.p, ls-ia.p and lsrt-ia.p and lwpanel.p (you may as well update them all if you haven't yet done so. They can be downloaded from http://www.lightwave-outpost.com/employees/bobh/
If you discover any other problems with the operation of these scripts e-mail me at the following address nick@ap3d.com with details including version of LW, any error generated and the settings used in the options panel. I will attempt to fix the problem, time permitting.
lens flare and lighting automation. At present this is unsupported within LScript and a work around would involve creating a new scene file. I haven't figured that one out yet, and it doesn't seem very elegant so we will have to wait and see what the next version of LScript can do.
A multiple instance version.
A more generic version that can be applied to more general scenes and doesn't require slave scripts.
Suggestions welcome.
Time for the legal part....
Whilst every effort has been made to ensure this compiled LScript functions properly. I or anyone or connected with me personally or otherwise cannot be held liable, responsible or accountable in any way for any loss or damage caused be use of this compiled LScript. It has been provided free for recreational purposes only.