Author Topic: How to Make Weapons for Blockland - The Up-To-Date version. (As of 2 years ago)  (Read 84574 times)

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

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

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?

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: [Select]
//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";


};
« Last Edit: August 07, 2009, 07:49:57 PM by Azerath »

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! >.>

Script added above. I hope it goes well. :)

I have done part of it.. But when i tryed it it still fired a Bullet?..
 im at a loss. Should i have no (muzzlePoint) or somthing?

Did you replace the script with the one I gave you?

Yep , Also..
"Before exporting, make sure all of the names of groups have no numbers at the end"
But in your Images you didn't do that?.. by this do you mean change Body23 to Body.

Ah silly me.. In the other script it said "NameOfYourWeapon" but
in this one it says "YourWeaponName" Sorry , Hehe

Yep , Also..
"Before exporting, make sure all of the names of groups have no numbers at the end"
But in your Images you didn't do that?.. by this do you mean change Body23 to Body.
Yes, and if you need to use numbers, type them out. Instead of 1, type one.

Thank you So much for all your Help!
                 
« Last Edit: February 21, 2010, 01:55:56 AM by Asp »

Nice! I'm guessing it's like a giant spotlight?

(Message deleted)
« Last Edit: July 08, 2011, 04:16:13 PM by Asp »

If i wanted to hold a Item with Two hands automaticly
do i add two mousePoint's or is it somthing in the script?
 :cookie:?