heres the script (the part in question i skipped the particle junk) :
//projectile
AddDamageType("WaterBalloonBlueDirect", '<bitmap:add-ons/Weapon_Soaker_Pack/CI_Water> %1', '%2 <bitmap:add-ons/Weapon_Soaker_Pack/CI_Water> %1',1,1);
AddDamageType("WaterBalloonBlueRadius", '<bitmap:add-ons/Weapon_Soaker_Pack/CI_WaterRadius> %1', '%2 <bitmap:add-ons/Weapon_Soaker_Pack/CI_WaterRadius> %1',1,0);
datablock ProjectileData(WaterBalloonBlueProjectile)
{
projectileShapeName = "./WaterBalloonBlueProjectile.dts";
directDamage = 70;
directDamageType = $DamageType::WaterBalloonBlueDirect;
radiusDamageType = $DamageType::WaterBalloonBlueRadius;
impactImpulse = 1000;
verticalImpulse = 1000;
explodeOnPlayerImpact = true;
explodeOnDeath = true;
explosion = WaterBalloonBlueExplosion;
brickExplosionRadius = 0;
brickExplosionImpact = false; //destroy a brick if we hit it directly?
brickExplosionForce = 0;
brickExplosionMaxVolume = 0;
brickExplosionMaxVolumeFloating = 0;
muzzleVelocity = 8;
velInheritFactor = 1;
armingDelay = 0;
lifetime = 5000;
fadeDelay = 19500;
bounceAngle = 100; //bounce almost all the time
minStickVelocity = 6;
bounceElasticity = 0.45;
bounceFriction = 0.0001;
isBallistic = true;
gravityMod = 1;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
uiName = "WaterBalloonBlue";
};
//////////
// item //
//////////
datablock ItemData(WaterBalloonBlueItem)
{
category = "Weapon"; // Mission editor category
className = "Weapon"; // For inventory system
// Basic Item Properties
shapeFile = "./WaterBalloonBlueItem.dts";
mass = 1;
density = 1.0;
elasticity = 0.6;
friction = 0.1;
emap = true;
//gui stuff
uiName = "WaterBalloonBlue";
iconName = "./icon_WaterBalloonBlue";
doColorShift = true;
colorShiftColor = "0.400 0.196 0 1.000";
// Dynamic properties defined by the scripts
image = WaterBalloonBlueImage;
canDrop = true;
};
//function WaterBalloonBlue::onUse(%this,%user)
//{
// //mount the image in the right hand slot
// %user.mountimage(%this.image, $RightHandSlot);
//}
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(WaterBalloonBlueImage)
{
// Basic Item properties
shapeFile = "./WaterBalloonBlue.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;
// Add the WeaponImage namespace as a parent, WeaponImage namespace
// provides some hooks into the inventory system.
className = "WeaponImage";
// Projectile && Ammo.
item = WaterBalloonBlueItem;
ammo = " ";
projectile = WaterBalloonBlueProjectile;
projectileType = Projectile;
//melee particles shoot from eye node for consistancy
melee = false;
//raise your arm up or not
armReady = true;
//casing = " ";
doColorShift = true;
colorShiftColor = "0.400 0.196 0 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.1;
stateTransitionOnTimeout[0] = "Ready";
stateSequence[0] = "ready";
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Charge";
stateAllowImageChange[1] = true;
stateName[2] = "Charge";
stateTransitionOnTimeout[2] = "Armed";
stateTimeoutValue[2] = 0.7;
stateWaitForTimeout[2] = false;
stateTransitionOnTriggerUp[2] = "AbortCharge";
stateScript[2] = "onCharge";
stateAllowImageChange[2] = false;
stateName[3] = "AbortCharge";
stateTransitionOnTimeout[3] = "Ready";
stateTimeoutValue[3] = 0.3;
stateWaitForTimeout[3] = true;
stateScript[3] = "onAbortCharge";
stateAllowImageChange[3] = false;
stateName[4] = "Armed";
stateTransitionOnTriggerUp[4] = "Fire";
stateAllowImageChange[4] = false;
stateName[5] = "Fire";
stateTransitionOnTimeout[5] = "Done";
stateTimeoutValue[5] = 0.5;
stateFire[5] = true;
stateSequence[5] = "fire";
stateScript[5] = "onFire";
stateWaitForTimeout[5] = true;
stateAllowImageChange[5] = false;
stateSound[5] = WaterBalloonBlueFireSound;
stateName[6] = "Done";
stateScript[6] = "onDone";
stateTransitionOnTimeout[6] = "Ready";
stateTimeoutValue[6] = 0.01;
stateWaitForTimeout[6] = True;
};
function WaterBalloonBlueImage::onCharge(%this, %obj, %slot)
{
%obj.playthread(2, SpearReady);
%obj.lastAGSlot = %obj.currTool;
}
function WaterBalloonBlueImage::onAbortCharge(%this, %obj, %slot)
{
%obj.playthread(2, root);
}
function WaterBalloonBlueImage::onFire(%this, %obj, %slot)
{
%obj.playthread(2, spearThrow);
Parent::onFire(%this, %obj, %slot);
%currSlot = %obj.lastAGSlot;
%obj.tool[%currSlot] = 0;
%obj.weaponCount--;
messageClient(%obj.client,'MsgItemPickup','',%currSlot,0);
serverCmdUnUseTool(%obj.client);
}
function WaterBalloonBlueImage::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}