you can specify the look limits in the player datablock with
minLookAngle = -$PI/2;
maxLookAngle = $PI/2;
this would allow the player type to look all the way up and all the way down
-PI/2 being straight down and PI/2 being straight up
for my turret player i use -0.2 and 0.2
this way you don't need to package and functions or anything for setting the look angle
http://files.swololol.com/bl/o/turretExample.blendhere is an example blend file of the animations you will have to make
please note any of the node/object names can be anything you want
EXCEPT for the node called eye, keep that as eye and just leave it where it is, it should be facing forwards towards where a player in control of this datablock will be looking
AND
mount0, this is where the player will be mounted to the turret
it shows two animations that are required for making a player, look and root
each of these animations will be exported to a seperate dsq file
you will want to export your turret model without any animations on it and the turret should be facing straight ahead for the animationless version
the look animation will be having the turret aim from directly up to directly down
in each dsq file open the blender text editor and add a file called Sequences
you will add one line of text respectivley for look and root animations
look: priority 8, blend
root: priority 0
at the end of all this you should have
turret.dts
t_look.dsq
t_root.dsq(file names can be whatever you want but these are a good baseline)
now in your code you will have to create a TSShapeConstructor
datablock TSShapeConstructor(turretNAMEDts)
{
baseShape = "./turret.dts";
sequence0 = "./t_root.dsq root";
sequence1 = "./t_root.dsq run";
sequence2 = "./t_root.dsq walk";
sequence3 = "./t_root.dsq back";
sequence4 = "./t_root.dsq side";
sequence5 = "./t_root.dsq crouch";
sequence6 = "./t_root.dsq crouchRun";
sequence7 = "./t_root.dsq crouchBack";
sequence8 = "./t_root.dsq crouchSide";
sequence9 = "./t_look.dsq look";
sequence10 = "./t_root.dsq headside";
sequence11 = "./t_root.dsq headUp";
sequence12 = "./t_root.dsq jump";
sequence13 = "./t_root.dsq standjump";
sequence14 = "./t_root.dsq fall";
sequence15 = "./t_root.dsq land";
sequence16 = "./t_root.dsq armAttack";
sequence17 = "./t_root.dsq armReadyLeft";
sequence18 = "./t_root.dsq armReadyRight";
sequence19 = "./t_root.dsq armReadyBoth";
sequence20 = "./t_root.dsq spearready";
sequence21 = "./t_root.dsq spearThrow";
sequence22 = "./t_root.dsq talk";
sequence23 = "./t_root.dsq death1";
sequence24 = "./t_root.dsq shiftUp";
sequence25 = "./t_root.dsq shiftDown";
sequence26 = "./t_root.dsq shiftAway";
sequence27 = "./t_root.dsq shiftTo";
sequence28 = "./t_root.dsq shiftLeft";
sequence29 = "./t_root.dsq shiftRight";
sequence30 = "./t_root.dsq rotCW";
sequence31 = "./t_root.dsq rotCCW";
sequence32 = "./t_root.dsq undo";
sequence33 = "./t_pop.dsq plant";
sequence34 = "./t_root.dsq sit";
sequence35 = "./t_root.dsq wrench";
};
essentially you will be setting every single default blockland animation to root except for the look animation, however you can of course add more animations to this either to an existing blockland animation by specifying a different dsq file or adding another line like
sequences36 = "./t_fire.dsq fire";which would add a new animation under the name fire
if you have any further questions ask here,
also a really good reference is the default tank turret, you can import the dts model and look at the dsq animations and the playertype datablock in the tank turret file