here they come
datablock AudioProfile(kickfire)
{
filename = "./kickmiss.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(kickhit)
{
filename = "./kickhit.wav";
description = AudioClose3d;
preload = true;
};
datablock ParticleData(pushBroomSparkParticle)
{
dragCoefficient = 4;
gravityCoefficient = 1;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 400;
lifetimeVarianceMS = 300;
textureName = "base/data/particles/chunk";
useInvAlpha = false;
spinSpeed = 150.0;
spinRandomMin = -150.0;
spinRandomMax = 150.0;
colors[0] = "0.30 0.10 0.0 0.0";
colors[1] = "0.30 0.10 0.0 0.5";
colors[2] = "0.30 0.10 0.0 0.0";
sizes[0] = 0.15;
sizes[1] = 0.15;
sizes[2] = 0.15;
times[0] = 0.1;
times[1] = 0.5;
times[2] = 1.0;
useInvAlpha = true;
};
datablock ParticleEmitterData(pushBroomSparkEmitter)
{
lifeTimeMS = 10;
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 5;
velocityVariance = 3.0;
ejectionOffset = 1.50;
thetaMin = 0;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = pushBroomSparkParticle;
uiName = "Push Broom Chunk";
};
datablock ParticleData(pushBroomExplosionParticle)
{
dragCoefficient = 10;
gravityCoefficient = -0.15;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 800;
lifetimeVarianceMS = 500;
textureName = "base/data/particles/cloud";
spinSpeed = 50.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0] = "1.0 1.0 1.0 0.25";
colors[1] = "0.0 0.0 0.0 0.0";
sizes[0] = 0.5;
sizes[1] = 1.0;
useInvAlpha = true;
};
datablock ParticleEmitterData(pushBroomExplosionEmitter)
{
lifeTimeMS = 50;
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 95;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = pushBroomExplosionParticle;
uiName = "Push Broom Dust";
emitterNode = HalfEmitterNode;
};
datablock ExplosionData(pushBroom2Explosion)
{
//explosionShape = "";
lifeTimeMS = 10;
//emitter[0] = pushBroomExplosionEmitter;
emitter[0] = pushBroomSparkEmitter;
particleEmitter = pushBroomExplosionEmitter;
particleDensity = 15;
particleRadius = 0.5;
faceViewer = true;
explosionScale = "1 1 1";
soundProfile = kickhit;
shakeCamera = false;
cameraShakeFalloff = false;
camShakeFreq = "2.0 3.0 1.0";
camShakeAmp = "1.0 1.0 1.0";
camShakeDuration = 2.5;
camShakeRadius = 0.0001;
// Dynamic light
lightStartRadius = 0;
lightEndRadius = 0;
lightStartColor = "0.0 0.0 0.0";
lightEndColor = "0 0 0";
};
//audio
datablock AudioProfile(KickReloadSound)
{
filename = "./shotgunReload.wav";
description = AudioClose3d;
preload = true;
};
//shell
datablock DebrisData(KickShellDebris)
{
shapeFile = "./shotgunShell.dts";
lifetime = 2.0;
minSpinSpeed = -400.0;
maxSpinSpeed = 200.0;
elasticity = 0.5;
friction = 0.2;
numBounces = 3;
staticOnMaxBounce = true;
snapOnMaxBounce = false;
fade = true;
gravModifier = 2;
};
//emitter
ParticleData(KickSmokeParticle)
{##
##
dragCoefficient = 3;
gravityCoefficient = -0.5;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 525;
lifetimeVarianceMS = 55;
textureName = "base/data/particles/cloud";
spinSpeed = 10.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0] = "0.5 0.5 0.5 0.5";
colors[1] = "0.5 0.5 0.5 0.0";
sizes[0] = 0.15;
sizes[1] = 0.1;
useInvAlpha = false;
};
datablock ParticleEmitterData(KickSmokeEmitter)
{
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "KickSmokeParticle";
};
AddDamageType("Kick", '<bitmap:add-ons/Weapon_Kick/CI_Kick> %1', '%2 <bitmap:add-ons/Weapon_Kick/CI_Kick> %1',0.5,1);
datablock ProjectileData(KickProjectile)
{
//projectileShapeName = "~/data/shapes/arrow.dts";
directDamage = 10;
impactImpulse = 500;
verticalImpulse = 500;
explosion = pushBroom2Explosion;
//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";
uiName = "Kick Test";
};
//////////
// item //
//////////
datablock ItemData(KickItem)
{
category = "Weapon"; // Mission editor category
className = "Weapon"; // For inventory system
// Basic Item Properties
shapeFile = "./Kick.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;
//gui stuff
uiName = "Kick";
iconName = "./KickIcon";
doColorShift = true;
colorShiftColor = "0.5 0.5 0.5 1.000";
// Dynamic properties defined by the scripts
image = kickImage;
canDrop = true;
};
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(kickImage)
{
// Basic Item properties
shapeFile = "./Kick.dts";
emap = true;
// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = 1; //change this to the right foot, I can't remember what number it is off the top of my head
offset = "0 0 0";
eyeoffset = "0.4 2.9 -0.45";
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 = KickItem;
ammo = " ";
projectile = KickProjectile; //is this really what you will use?
projectileType = Projectile;
casing = KickShellDebris;
shellExitDir = "1.0 0.1 1.0";
shellExitOffset = "0 0 0";
shellExitVariance = 10.0;
shellVelocity = 5.0;
//melee particles shoot from eye node for consistancy
melee = true;
//raise your arm up or not
armReady = false;
minShotTime = 1000;
doColorShift = true;
colorShiftColor = KickItem.colorShiftColor;
// 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";
stateWaitForTimeout[0] = true;
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1]= "Fire";
stateAllowImageChange[1] = true;
// stateEmitter[1] = PyGunambientEmitter;
// stateEmitterTime[1] = 1000;
// stateEmitterNode[1] = "muzzlePoint";
stateName[2] = "Fire";
stateTransitionOnTimeout[2] = "Smoke";
stateTimeoutValue[2] = 0.2;
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire";
stateScript[2] = "onFire";
stateWaitForTimeout[2] = true;
stateSound[2] = kickfire;
stateTransitionOnTimeout[2] = "Smoke";
stateName[3] = "Smoke";
stateScript[3] = "onSmoke";
stateTimeoutValue[3] = 0.5;
stateTransitionOnTimeout[3] = "Ready";
};
function kickImage::onFire(%this, %obj, %slot)
{
%obj.hideNode(rShoe);
%obj.hideNode(rPeg);
}
function kickImage::onSmoke(%this, %obj, %slot)
{
%obj.unMountImage(Mountpoint1); //I have forgotten the number the rShoe is
%obj.client.applyBodyParts();
%obj.client.applyBodyColors();
}
the syntax is here
//emitter
ParticleData(KickSmokeParticle)
{##
##
dragCoefficient = 3;
gravityCoefficient = -0.5;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 525;
lifetimeVarianceMS = 55;
textureName = "base/data/particles/cloud";
spinSpeed = 10.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0] = "0.5 0.5 0.5 0.5";
colors[1] = "0.5 0.5 0.5 0.0";
sizes[0] = 0.15;
sizes[1] = 0.1;
useInvAlpha = false;
};