Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //FNP.cs
- AddDamageType("FNP", '<bitmap:add-ons/Weapon_Package_FortWars/graphics/CI_FNP> %1', '%2 <bitmap:add-ons/Weapon_Package_FortWars/graphics/CI_FNP> %1',0.2,1);
- AddDamageType("FNPHeadshot", '<bitmap:add-ons/Weapon_Package_FortWars/graphics/CI_FNP><bitmap:add-ons/Weapon_Package_FortWars/graphics/ci_headshot> %1', '%2 <add-ons/Weapon_Package_FortWars/graphics/CI_FNP><bitmap:add-ons/Weapon_Package_FortWars/graphics/ci_headshot> %1',0.75,1);
- datablock ProjectileData(FNPProjectile)
- {
- projectileShapeName = "./bullet.dts";
- directDamage = 25;
- directDamageType = $DamageType::FNP;
- radiusDamageType = $DamageType::FNP;
- brickExplosionRadius = 0;
- brickExplosionImpact = true; //destroy a brick if we hit it directly?
- brickExplosionForce = 10;
- brickExplosionMaxVolume = 1; //max volume of bricks that we can destroy
- brickExplosionMaxVolumeFloating = 2; //max volume of bricks that we can destroy if they aren't connected to the ground
- impactImpulse = 400;
- verticalImpulse = 400;
- explosion = FNPExplosion;
- particleEmitter = FNPtrailEmitter;
- muzzleVelocity = 150;
- velInheritFactor = 1;
- armingDelay = 00;
- lifetime = 4000;
- fadeDelay = 3500;
- bounceElasticity = 0.5;
- bounceFriction = 0.20;
- isBallistic = false;
- gravityMod = 0.0;
- hasLight = true;
- lightRadius = 1.5;
- lightColor = "1 0.8 0";
- uiName = "FNP Bullet";
- };
- //////////
- // item //
- //////////
- datablock ItemData(FNPItem)
- {
- category = "Weapon"; // Mission editor category
- className = "Weapon"; // For inventory system
- // Basic Item Properties
- shapeFile = "./fnp.dts";
- rotate = false;
- mass = 1;
- density = 0.2;
- elasticity = 0.2;
- friction = 0.6;
- emap = true;
- //gui stuff
- uiName = "Pistol A";
- iconName = "add-ons/Weapon_Package_FortWars/graphics/icon_FNP";
- doColorShift = true;
- colorShiftColor = "0.25 0.25 0.25 1.000";
- // Dynamic properties defined by the scripts
- image = FNPImage;
- canDrop = true;
- };
- ////////////////
- //weapon image//
- ////////////////
- datablock ShapeBaseImageData(FNPImage)
- {
- // Basic Item properties
- shapeFile = "./fnp.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 = FNPProjectile;
- projectileType = Projectile;
- casing = FNPShellDebris;
- shellExitDir = "1.0 1.3 -0.3";
- shellExitOffset = "0 0 0";
- shellExitVariance = 15.0;
- shellVelocity = 7.0;
- //melee particles shoot from eye node for consistancy
- melee = false;
- //raise your arm up or not
- armReady = true;
- doColorShift = true;
- colorShiftColor = FNPItem.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] = "ActivateFirst";
- stateTimeoutValue[0] = 0.8;
- stateTransitionOnTimeout[0] = "Ready";
- stateSequence[0] = "firstDraw";
- stateSound[0] = FNPFirstDrawSound;
- stateName[1] = "Ready";
- stateTransitionOnTriggerDown[1] = "Fire";
- stateSequence[1] = "idle";
- stateAllowImageChange[1] = true;
- stateSequence[1] = "Ready";
- stateName[2] = "Fire";
- stateTransitionOnTimeout[2] = "Flame";
- stateTimeoutValue[2] = 0.01;
- stateFire[2] = true;
- stateAllowImageChange[2] = false;
- stateScript[2] = "onFire";
- stateWaitForTimeout[2] = true;
- stateEmitter[2] = FNPFireFlameEmitter;
- stateEmitterTime[2] = 0.02;
- stateEmitterNode[2] = "muzzleNode";
- stateEjectShell[2] = true;
- stateName[3] = "Flame";
- stateSequence[3] = "Fire";
- stateEmitter[3] = FNPFireGlowEmitter;
- stateEmitterTime[3] = 0.05;
- stateEmitterNode[3] = "muzzleNode";
- stateTimeoutValue[3] = 0.14;
- stateTransitionOnTimeout[3] = "Smoke";
- stateName[4] = "Smoke";
- stateEmitter[4] = FNPFireSmokeEmitter;
- stateEmitterTime[4] = 3.0;
- stateEmitterNode[4] = "muzzleNode";
- stateTimeoutValue[4] = 0.01;
- stateTransitionOnTimeout[4] = "Reload";
- stateName[5] = "Reload";
- stateSequence[5] = "Reload";
- stateTransitionOnTriggerUp[5] = "Ready";
- stateSequence[5] = "Ready";
- };
- function FNPImage::onFire(%this,%obj,%slot)
- {
- %obj.spawnExplosion(QuakeLittleRecoilProjectile,"1 1 1");
- %obj.playThread(2, plant);
- %num = getRandom(1, 3);
- serverPlay3D( FNPFireLocal @ %num @ Sound, %obj.getHackPosition() SPC "0 0 1 0");
- serverplay2d( FNPFireGlobal @ %num @ Sound );
- Parent::onFire(%this,%obj,%slot);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement