bow help

Author Topic: bow help  (Read 7842 times)

i cant get both the sword and a modfied copy of it called knife to work at the same time on my server :panda:pleas help !!!!nvm i got it tyty foolycooly i give you many  :cookie: :iceCream:  :cookie: :iceCream:  :cookie: :iceCream:  :cookie: :iceCream:  :cookie: :iceCream:

also how do i make melle wepons hit faster nead help on this now for short swordalso how do i make in make no sownd
how do i change the coler of the actual item

thears some of my wepons now im thinking of  editing bows
also gona ad admint and mithtil
                   ^^
    look at next post of mine
« Last Edit: June 04, 2007, 12:52:54 PM by ciber spy »

For starters; The knife script only has a modified ui name.

and less damadge pardo my spelling its for flavor to my midevil build :<
and im just starting to learn to skript by modfing some stufe

hears anothe one
« Last Edit: May 31, 2007, 02:22:02 PM by ciber spy »

and less damadge pardo my spelling its for flavor to my midevil build :<
and im just starting to learn to skript
I only understood the words "And, Spelling, Flavor, and Build". Other than that, it's complete gibberish.

do you have a model for it?
right now this is the edited thing... but youll need to change the shape file
Code: [Select]
//knife.cs
datablock AudioProfile(knifeDrawSound)
{
   filename    = "./sound/swordDraw.wav";
   description = AudioClosest3d;
   preload = true;
};
datablock AudioProfile(knifeHitSound)
{
   filename    = "./sound/swordHit.wav";
   description = AudioClosest3d;
   preload = true;
};


//effects
datablock ParticleData(knifeExplosionParticle)
{
   dragCoefficient      = 2;
   gravityCoefficient   = 1.0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   spinRandomMin = -90;
   spinRandomMax = 90;
   lifetimeMS           = 500;
   lifetimeVarianceMS   = 300;
   textureName          = "base/data/particles/chunk";
   colors[0]     = "0.7 0.7 0.9 0.9";
   colors[1]     = "0.1 0.9 0.9 0.0";
   sizes[0]      = 0.5;
   sizes[1]      = 0.25;
};

datablock ParticleEmitterData(knifeExplosionEmitter)
{
   ejectionPeriodMS = 7;
   periodVarianceMS = 0;
   ejectionVelocity = 8;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 60;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "knifeExplosionParticle";
};

datablock ExplosionData(knifeExplosion)
{
   //explosionShape = "";
   lifeTimeMS = 500;

   soundProfile = knifeHitSound;

   particleEmitter = knifeExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = true;
   camShakeFreq = "20.0 22.0 20.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 3;
   lightEndRadius = 0;
   lightStartColor = "00.0 0.2 0.6";
   lightEndColor = "0 0 0";
};


//projectile
AddDamageType("knife",   '<bitmap:add-ons/ci/knife> %1',    '%2 <bitmap:add-ons/ci/knife> %1',1,1);
datablock ProjectileData(knifeProjectile)
{
   //projectileShapeName = "~/data/shapes/arrow.dts";
   directDamage        = 10;
   directDamageType  = $DamageType::knife;
   radiusDamageType  = $DamageType::knife;
   explosion           = knifeExplosion;
   //particleEmitter     = as;

   muzzleVelocity      = 50;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 100;
   fadeDelay           = 70;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = false;
   gravityMod = 0.0;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";
};


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

// Basic Item Properties
shapeFile = "./shapes/sword.dts";
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

//gui stuff
uiName = "knife";
iconName = "./ItemIcons/knife";
doColorShift = true;
colorShiftColor = "0.471 0.471 0.471 1.000";

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

//function knife::onUse(%this,%user)
//{
// //if the image is mounted already, unmount it
// //if it isnt, mount it
//
// %mountPoint = %this.image.mountPoint;
// %mountedImage = %user.getMountedImage(%mountPoint);
//
// if(%mountedImage)
// {
// //echo(%mountedImage);
// if(%mountedImage == %this.image.getId())
// {
// //our image is already mounted so unmount it
// %user.unMountImage(%mountPoint);
// }
// else
// {
// //something else is there so mount our image
// %user.mountimage(%this.image, %mountPoint);
// }
// }
// else
// {
// //nothing there so mount
// %user.mountimage(%this.image, %mountPoint);
// }
//}

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(knifeImage)
{
   // Basic Item properties
   shapeFile = "./shapes/sword.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.1 0.2 -0.55";

   // 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 = false;

   eyeOffset = "0.7 1.2 -0.25";

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = knifeItem;
   ammo = " ";
   projectile = knifeProjectile;
   projectileType = Projectile;

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

   //casing = " ";
   doColorShift = true;
   colorShiftColor = "0.471 0.471 0.471 1.000";

   // 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.5;
stateTransitionOnTimeout[0]      = "Ready";
stateSound[0]                    = knifeDrawSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "PreFire";
stateAllowImageChange[1]         = true;

stateName[2] = "PreFire";
stateScript[2]                  = "onPreFire";
stateAllowImageChange[2]        = false;
stateTimeoutValue[2]            = 0.1;
stateTransitionOnTimeout[2]     = "Fire";

stateName[3]                    = "Fire";
stateTransitionOnTimeout[3]     = "CheckFire";
stateTimeoutValue[3]            = 0.2;
stateFire[3]                    = true;
stateAllowImageChange[3]        = false;
stateSequence[3]                = "Fire";
stateScript[3]                  = "onFire";
stateWaitForTimeout[3] = true;
//stateTransitionOnTriggerUp[3] = "StopFire";

stateName[4] = "CheckFire";
stateTransitionOnTriggerUp[4] = "StopFire";
stateTransitionOnTriggerDown[4] = "Fire";


stateName[5]                    = "StopFire";
stateTransitionOnTimeout[5]     = "Ready";
stateTimeoutValue[5]            = 0.2;
stateAllowImageChange[5]        = false;
stateWaitForTimeout[5] = true;
stateSequence[5]                = "StopFire";
stateScript[5]                  = "onStopFire";


};

function knifeImage::onPreFire(%this, %obj, %slot)
{
//messageAll( 'MsgClient', 'knife prefired!!!');
//Parent::onFire(%this, %obj, %slot);
%obj.playthread(2, armattack);
}

function knifeImage::onStopFire(%this, %obj, %slot)
{
%obj.playthread(2, root);
//messageAll( 'MsgClient', 'stopfire');
}

im just using sword model i gota use what i have i have no idea how to model
also like i said i am learning to skript by modfing
« Last Edit: May 30, 2007, 06:15:32 PM by ciber spy »

and less damadge pardo my spelling its for flavor to my midevil build :<
and im just starting to learn to skript
I only understood the words "And, Spelling, Flavor, and Build". Other than that, it's complete gibberish.
   then learn ciberanees

now i nead to work on long swords
and be told how to make bows that fire faster and farther     



To make a sword longer, make a new model or try (unsure) adding the code
Code: [Select]
scale = "1 1 1.3 to the swordImage datablock. For faster bows, do you mean fast reload or fast arrows?

both im making 3 variants of the bow
short bow relods faster 
long bow longer reloed faster arows  that fly farther
and elvish bow a vamped up long bow with lowear reload time
o also im abel to change the color of the item in inventory but no when wielding or on the spwan
and ty for fianly posting

also i found this weird thing when browsing my addon folder i see stuf like called sceleton dts frome fooly coolys server
« Last Edit: June 06, 2007, 01:23:09 PM by ciber spy »

For fast arrows, change this to a higher speed in the projectile:
Code: [Select]
muzzleVelocity      = 50;For accurate arrows (less fall speed), change this to lower:
Code: [Select]
gravityMod = 1.0;For faster reload, edit the timeout in this part of the code:
Code: [Select]
stateName[3] = "Reload";
stateSequence[3]                = "Reload";
stateAllowImageChange[3]        = false;
stateTimeoutValue[3]            = 0.5;
stateWaitForTimeout[3] = true;
stateTransitionOnTimeout[3]     = "Check";
For a different colour, change this in both the item and the image sections (bowItem, bowImage):
Code: [Select]
   doColorShift = true;
   colorShiftColor = "1 1 1 1";

Colour in format R G B A, A = Alpha. (Leave at 1 or glitches) Go into Paint/Edit Colours to test different RGB values.

If all these weapons are for an RPG, don't forget that an awful lot of other people are making RPGs too... (Me, Ephialtes, Jervan / Destruction, Aloshi, ...)

i just making wepons for my server id b glad to let anyone use em


also im not shur i get color
iv ben changing the colorshiftcolor

hello bump bumpty bump bump bump bump bumppp
pleas reply