Author Topic: My handcuff not show up in list in game  (Read 850 times)

in Milkshape



Code: [Select]
//item_handcuff.cs



//////////
// item //
//////////
datablock ItemData(handcuff)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

// Basic Item Properties
shapeFile = "./handcuff.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

//gui stuff
uiName = "handcuff";
iconName = "";
doColorShift = true;
colorShiftColor = "1.0 1.0 1.0 1.0";

// Dynamic properties defined by the scripts
image = handcuffImage;
canDrop = true;
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(handcuffImage)
{
   // Basic Item properties
   shapeFile = "./handcuff.dts";
   emap = true;


   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 0";
   eyeoffset = "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 = handcuff;
   ammo = " ";
   projectile = gunProjectile;
   projectileType = Projectile;

casing = gunShellDebris;
shellExitDir        = "0.0 0.0 0.0";
shellExitOffset     = "0 0 0";
shellExitVariance   = 0.0;
shellVelocity       = 0.0;

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;

   doColorShift = false;
   colorShiftColor = handcuff.colorShiftColor;//"0.400 0.196 0 1.000";

   //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]             = 0.0;
stateTransitionOnTimeout[0]       = "Ready";
stateSound[0] = weaponSwitchSound;

function handcuffImage::onMount(%this, %obj, %slot)  //change M4A1 to whatever you want
{
%obj.hidenode("RHand");
        %obj.hidenode("LHand");
}


function handcuffImage::onUnMount(%this, %obj, %slot) //change M4A1 to whatever you want
{
%obj.unhidenode("RHand");
        %obj.unhidenode("LHand");
}

I just need make both raise arms up

How I fix it?

You can't really raise the hands if they're hidden. You'd probably have to do that on the model.

You can't really raise the hands if they're hidden. You'd probably have to do that on the model.

Ignore this



%obj.playThread(0, armReadyBoth);

Ignore this



%obj.playThread(0, armReadyBoth);

Where I put that?
on bottom?

Instead of that crap model with hands, have players raise both arms and mount the handcuffs on top. That way they can keep their hand colors or use the pirate hooks.

actually I don't have to export a hands model just only item.

actually I don't have to export a hands model just only item.
this