//Player_R2D2.cs
datablock PlayerData(PlayerR2D2Armor : PlayerStandardArmor)
{
runForce = 100 * 90;
runEnergyDrain = 0;
minRunEnergy = 0;
maxForwardSpeed = 5;
maxBackwardSpeed = 5;
maxSideSpeed = 0;
maxLookAngle = 0;
maxfreelookangle = 0;
minfreelookangle = 0;
minlookangle = 0;
maxForwardCrouchSpeed = 0;
maxBackwardCrouchSpeed = 0;
maxSideCrouchSpeed = 0;
minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;
canjump = 0;
uiName = "R2D2";
showEnergyBar = false;
runSurfaceAngle = 55;
jumpSurfaceAngle = 55;
};
datablock ShapeBaseImageData(R2D2Image)
{
// Basic Item properties
shapeFile = "./shapes/SWP/R2D2.dts";
emap = true;
// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = $BackSlot;
offset = "0 0 -1.3";
eyeOffset = 1; //"0.0 0.0 20.0";
rotation = eulerToMatrix( "0 0 0" );
// When firing from a point offset from the eye, muzzle correction
// will adjust the muzzle vector to point to the eye LOS point.
// Since this weapon doesn't actually fire from the muzzle point,
// we need to turn this off.
correctMuzzleVector = true;
// Add the WeaponImage namespace as a parent, WeaponImage namespace
// provides some hooks into the inventory system.
className = "WeaponImage";
// Projectile && Ammo.
item = BowItem;
ammo = " ";
projectile = GunProjectile;
projectileType = Projectile;
//melee particles shoot from eye node for consistancy
melee = false;
//raise your arm up or not
armReady = false;
doColorShift = true;
colorShiftColor = "1 1 1 1";
//casing = " ";
// Images have a state system which controls how the animations
// are run, which sounds are played, script callbacks, etc. This
// state system is downloaded to the client so that clients can
// predict state changes and animate accordingly. The following
// system supports basic ready->fire->reload transitions as
// well as a no-ammo->dryfire idle state.
// Initial start up state
stateName[0] = "Activate";
stateTimeoutValue[0] = 5000000000;
stateTransitionOnTimeout[0] = "Activate";
};
if(%obj.dataBlock $= "PlayerR2D2Armor")
{
%obj.hidenode("ALL");
%obj.mountImage(R2D2image,0);
}
So basically when you apply the R2D2 datablock to the player, I want them to become invisible, and have R2D2.dts mounted to them.