Blockland Forums > Modification Help

How to Make Weapons for Blockland - The Up-To-Date version. (As of 2 years ago)

Pages: << < (4/44) > >>

Asp:

 Just a little Confused. What to do about the size
     in knowing what size is best for the hand.

Azerath:

Ah yes, thanks for reminding me. The hand gap size is the size of a joint. 2x2 grid squares.

Asp:

Is that the grid size that you start with in the 3D view (When file > new)
Also; What would be needed to have a weapon that Holdable but does nothing ,
would i just change the code settings to = 0?

Azerath:

That would probably be really simple. In fact, I'll try to make the script FOR you.
Also, when you start up Milkshape 3D, just place a joint, then zoom in on it. It should be the size of those grid squares.

Use this script. Copy the whole thing, paste it over everything in the CS file, and use the ctrl + h thing. Replace "YourWeaponName" with your weapon's model name. You won't need sounds, a bullet model, shell model or anything like that. All you need is this script, your model, the description, and namecheck file.

--- Code: ---//YourWeaponName.cs

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

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

//gui stuff
uiName = "YourWeaponName";
iconName = "./icon_YourWeaponName";
doColorShift = true;
colorShiftColor = "0.25 0.25 0.25 1.000";

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

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(YourWeaponNameImage)
{
   // Basic Item properties
   shapeFile = "./YourWeaponName.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.7 1.2 -0.5";
   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 = YourWeaponNameProjectile;
   projectileType = Projectile;

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

   doColorShift = true;
   colorShiftColor = YourWeaponNameItem.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.15;
stateTransitionOnTimeout[0]       = "NoAction";
stateSound[0] = weaponSwitchSound;

stateName[1]                     = "NoAction";
stateTransitionOnTriggerDown[1]  = "NoAction";
stateAllowImageChange[1]         = true;
stateSequence[1] = "Ready";


};

--- End code ---


Asp:

Awsome! , It just i wanted to make an Addon that would work with the
IfItemInHand or Slot event. So you can do Delivery Services with Branded
Boxes or Somthing...even Pizza Delivery! >.>

Pages: << < (4/44) > >>

Go to full version