Author Topic: Playertype with default animations?  (Read 1874 times)




I have a model that is just the default model with extra stuff.

How can I use the default animations? I'm a little stumped.

It's too bad I'm  not good in explaining in english..
You can just hide chest nude and head nude ( in the player) and make the shrekk body and head without all his otherstuff..
export his chest and head together..
It works like in hat mod which made..
This you should put in shrekk bot/player (onAdd):


Code: [Select]
function ShrekkHoleBot::onAdd(%this,%obj)
{
armor::onAdd(%this,%obj);

//Appearance Shrekk
//%obj.mountimage(bodychestImage,2) ;
              %obj.mountimage(bodychestImage,2) ;
%obj.setscale("1.1 1.1 1.1") ;
%obj.llegcolor = "0.827103 0.649533 0.32243 1" ;
%obj.secondPackColor =  "0 0.435 0.831 1" ;
%obj.lhand =  "0" ;
%obj.faceName =  "smiley" ;
%obj.rarmColor =  "0.827103 0.649533 0.32243 1" ;
%obj.hatColor =  "1 1 1 1" ;
%obj.hipColor =  "0.32243 0.228972 0.0841122 1" ;
         %obj.hideNode(chest);
%obj.rarm =  "0" ;
%obj.packColor =  "0.2 0 0.8 1" ;
%obj.pack =  "0" ;
%obj.decalName =  "BodyBuilder" ;
%obj.larmColor =  "0.827103 0.649533 0.32243 1" ;
%obj.secondPack =  "0" ;
%obj.larm =  "0" ;
%obj.chestcolor = "0.827103 0.649533 0.32243 1" ;
%obj.accentColor =  "0.990 0.960 0 0.700" ;
%obj.rhandColor =  "0.827103 0.649533 0.32243 1" ;
%obj.rleg =  "0" ;
%obj.rlegcolor = "0.827103 0.649533 0.32243 1" ;
%obj.accent =  "1" ;
         %obj.hideNode(Head);
%obj.rhand =  "0" ;
%obj.lleg =  "0" ;
%obj.lhandColor =  "0.827103 0.649533 0.32243 1" ;
%obj.hat =  "0" ;

%obj.headcolor = "0.827103 0.649533 0.32243 1" ;

GameConnection::ApplyBodyParts(%obj) ;
GameConnection::ApplyBodyColors(%obj) ;
%obj.setTeam(1, "BlockCastiels"); // Make it part of a team but neutral to others
}
color = "0.827103 0.649533 0.32243 1---------->That's I decided to put for my special bot..
and the chest code:
Code: [Select]
datablock ShapeBaseImageData(bodychestImage)
{
shapeFile = "./bodychest.dts";
emap = true;
mountPoint = 2;
offset = "0 0 0.1";
eyeOffset = "0 0 -4";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = true;
colorShiftColor = "0.766355 0.630841 0.523364 1";
};

function serverCmdbodychest(%client)
{
%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(bodychestImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(bodychestImage,2);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($chest[%i]);
%player.hideNode($head[%i]);
%player.hideNode($pants[%i]);
}
}
}
}


colorShiftColor = "0.766355 0.630841 0.523364 1-----> That's a color I decided to put..when the model have material with name: "blank"
« Last Edit: July 05, 2014, 08:53:44 PM by BlockAlpha »

You have to create a TSShapeConstructor for it, using the default animations in your shrek player type addon folder. Visolator explained it here.
« Last Edit: July 06, 2014, 08:24:10 AM by Ninjaman 4 »

don't DSQ files only work on a specific bone though? is there a full list of bones inside m.dts?