Author Topic: Weapon Help  (Read 1478 times)

Ok so i made a weapon and changed everything in the bow script to what i needed and when i spawned it it showed up as the model i made but then i picked it up and it was the Bow insted of my wep.

Can some one help me?

Ok so i made a weapon and changed everything in the bow script to what i needed and when i spawned it it showed up as the model i made but then i picked it up and it was the Bow insted of my wep.

Can some one help me?

There are two spots where you have to change the Shape File (the model) in a weapon script: One spot is in the Item datablock and the other is in the Weapon datablock.

What happened is that you didn't change the Weapon datablock shapefile. Find these lines:

Code: [Select]
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(bowImage)
{
   // Basic Item properties
   shapeFile = "./bow.dts";
   emap = true;

Change the shapefile to your weapon model's name

Code: [Select]
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(bowImage)
{
   // Basic Item properties
   shapeFile = "./YourWeaponNameHere.dts";  //Replace YourWeaponNameHere with the name of your weapon
   emap = true;

Try that. If you already changed this line or the problem persists then we'll need more info.

no still didnt work heres the script:

Code: [Select]
//////////
// item //
//////////
datablock ItemData(CrossBowItem)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

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

//gui stuff
uiName = "CrossBow";
iconName = "./icon_bow";
doColorShift = true;
colorShiftColor = "0.400 0.196 0 1.000";

// Dynamic properties defined by the scripts
image = bowImage;    // <--------------------------------------- Well there's your problem
canDrop = true;
};

Your weapon is still using the Bow image. Change that to CrossbowImage

ok so i did that but now its not shooting : (

Edit: Fixed but no sound plays when the bolt hits somthing
« Last Edit: August 11, 2008, 09:35:35 PM by spartan 911 »