Ramp Marshall: Difference between revisions

Jump to navigation Jump to search
Sorry, update but to the wrong version :( - will check out the new version
(Sorry, update but to the wrong version :( - will check out the new version)
Line 65: Line 65:
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
var pos = {
var pos = {
rest: {lA_x:80, lA_z:0, lAO_x:0, rA_x:-80, rA_z:0, rAO_x:0},
rest: rmPos.new(lA_x:80, rA_x:-80),
stop: {lA_x:-55, lA_z:0, lAO_x:-70, rA_x:55, rA_z:0, rAO_x:70},
stop: rmPos.new(lA_x:-55, lAO_x:-70, rA_x:55, rAO_x:70),
fwd_out: {lA_x:0, lA_z:-50, lAO_x:-30, rA_x:0, rA_z:50, rAO_x:30},
fwd_out: rmPos.new(lA_z:-50, lAO_x:-30, rA_z:50, rAO_x:30),
fwd_in: {lA_x:0, lA_z:-50, lAO_x:-120, rA_x:0, rA_z:50, rAO_x:120},
fwd_in: rmPos.new(lA_z:-50, lAO_x:-120, rA_z:50, rAO_x:120),
left_in: {lA_x:0, lA_z:0, lAO_x:-120, rA_x:0, rA_z:0, rAO_x:0},
left_in:   rmPos.new(lAO_x:-120),
left_out: {lA_x:0, lA_z:0, lAO_x:-30, rA_x:0, rA_z:0, rAO_x:0},
left_out: rmPos.new(lAO_x:-30),
right_in: {lA_x:0, lA_z:0, lAO_x:0, rA_x:0, rA_z:0, rAO_x:120},
right_in: rmPos.new(rAO_x:120),
right_out: {lA_x:0, lA_z:0, lAO_x:0, rA_x:0, rA_z:0, rAO_x:30}
right_out: rmPos.new(rAO_x:30)
};
};
</syntaxhighlight>
</syntaxhighlight>


* lA_x - Left Arm (shoulder joint) x axis rotation
* lA_x - Left Arm (shoulder joint) x axis rotation
* lA_z - Lett Arm (shoulder joint) z axis rotation
* lA_y - Left Arm (shoulder joint) y axis rotation
* lA_z - Left Arm (shoulder joint) z axis rotation
* lAO_x - Left Arm Outer (elbow joint) x axis rotation
* lAO_x - Left Arm Outer (elbow joint) x axis rotation
* lH_x - Left Hand x axis rotation
* lH_y - Left Hand y axis rotation
* lH_z - Left Hand x axis rotation
* rA_x - Right Arm (shoulder joint) x axis rotation
* rA_x - Right Arm (shoulder joint) x axis rotation
* rA_y - Right Arm (shoulder joint) y axis rotation
* rA_z - Right Arm (shoulder joint) z axis rotation
* rA_z - Right Arm (shoulder joint) z axis rotation
* rAO_x - Right Arm Outer (elbow joint) x axis rotation
* rAO_x - Right Arm Outer (elbow joint) x axis rotation
* rH_x - Right Hand x axis rotation
* rH_y - Right Hand y axis rotation
* rH_z - Right Hand x axis rotation


You can mess with the positions in a 3D modeling program or in FlightGear itself. Just set the ramp marshallers function to somethign random so it isn't recognised and change the values in the tree.
You can mess with the positions in a 3D modeling program or in FlightGear itself. Just look in the property tree under <tt>/airports/{icao}/ramps/ramp[n]</tt> (find the correct 'n' index for the person last clicked on by looking at the <tt>/airports/active-ramp</tt> property) and set the ramp marshaller's function to something random (so it isn't recognized) and change the values in the tree. Note: to get this to work properly, you first have to click on the nearest ramp marshaller, look up his index, and then click on a different marshaller so that the other marshaller's properties are not updated.


If you would like to add a new hand position (say both hands out stright), then you'd add this to the bottom of the '''pos''' hash.
If you would like to add a new hand position (say both hands out stright), then you'd add this to the bottom of the '''pos''' hash.


<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
     hands_out_front: {lA_x:0, lA_z:-90, lAO_x:0, rA_x:0, rA_z:90, rAO_x:0}
     hands_out_front: rmPos.new(lA_z:-90, rA_z:90)
</syntaxhighlight>
</syntaxhighlight>


You can also create positions during runtime in the '''main_loop''' using the '''rmPos.new''' function. (See below)
Note that one only needs to specify the rotations that are non-zero using hash syntax (key:value) in the arguments to the rmPos.new function. Remember to put a comma after the line right before the new one you add, since each line needs to end with a comma.
 
Remember to put a comma after the line right before the new one you add.


Now, you can call this position as '''pos.hands_out_front''' to be used in the sequence function. Or if you'd like to get or set one of the position values.
Now, you can call this position as '''pos.hands_out_front''' to be used in the sequence function. Or if you'd like to get or set one of the position values.
Line 134: Line 139:
'''NOTE -''' If any of the functions has '''ramp_tree''' as an argument and the function is being used within the ''main_loop'', the variable '''ramp_tree''' must be passed as an argument.
'''NOTE -''' If any of the functions has '''ramp_tree''' as an argument and the function is being used within the ''main_loop'', the variable '''ramp_tree''' must be passed as an argument.


=== Using dfferent models or textures ===
=== Using different models or textures ===


Soon, new features will becoming available which lets the ramp marshaller model be specified in the position config file.
Soon, new features will becoming available which lets the ramp marshaller model be specified in the position config file.
395

edits

Navigation menu