Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Kill Stuff
- AddDamageType("M134", '<bitmap:add-ons/Weapon_Package_HKextend/M134/CI_M134> %1', '%2 <bitmap:add-ons/Weapon_Package_HKextend/M134/CI_M134> %1',0.75,1);
- //stolen from bushi's nailgun, get rekt
- datablock ParticleData(M134FireParticle)
- {
- dragCoefficient = 0;
- gravityCoefficient = -0.5;
- inheritedVelFactor = 0.2;
- constantAcceleration = 0.0;
- lifetimeMS = 40;
- lifetimeVarianceMS = 0;
- textureName = "base/data/particles/star1";
- spinSpeed = 10.0;
- spinRandomMin = -500.0;
- spinRandomMax = 500.0;
- colors[0] = "0.9 0.9 0 0.3";
- colors[1] = "1 0.5 0.2 0.5";
- colors[2] = "1 0.5 0.2 0.0";
- sizes[0] = 1.3;
- sizes[1] = 0.68;
- sizes[2] = 0.34;
- times[0] = 0.0;
- times[1] = 0.1;
- times[2] = 1.0;
- useInvAlpha = false;
- };
- datablock ParticleEmitterData(M134FireEmitter)
- {
- ejectionPeriodMS = 1;
- periodVarianceMS = 0;
- ejectionVelocity = 48.0;
- velocityVariance = 0.0;
- ejectionOffset = 0.0;
- thetaMin = 0;
- thetaMax = 1;
- phiReferenceVel = 0;
- phiVariance = 360;
- overrideAdvance = false;
- particles = "M134FireParticle";
- };
- // Item Data
- datablock ItemData(M134Item)
- {
- category = "Weapon"; // Mission editor category
- className = "Weapon"; // For inventory system
- // M134 Item Properties
- shapeFile = "./M134.dts";
- rotate = false;
- mass = 1;
- density = 0.2;
- elasticity = 0.2;
- friction = 0.6;
- emap = true;
- //gui stuff
- uiName = "HK: M134 Minigun";
- iconName = "add-ons/Weapon_Package_HKextend/M134/Icon_M134";
- doColorShift = true;
- colorShiftColor = "0.6 0.6 0.6 1";
- // Dynamic properties defined by the scripts
- image = M134Image;
- canDrop = true;
- RYG_Reloads = 0; // This weapon can't reload! What, do you just cram hundreds of bullets into your pockets or something? You goof.
- RYG_ClipSize = 225; // Max clip size for this weapon.
- // Weapon description for guis or w/e.
- RYG_Description = "BUDDA BUDDA BUDDA BUDDA BUDDA BUDDA BUDDA";
- };
- // Weapon Image
- datablock ShapeBaseImageData(M134Image)
- {
- // M134 Image properties
- shapeFile = "./M134.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 = M134Item;
- ammo = " ";
- projectile = gunProjectile;
- projectileType = Projectile;
- casing = GunShellDebris;
- 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 = false;
- //raise your arm up or not
- armReady = true;
- doColorShift = true;
- colorShiftColor = M134Item.colorShiftColor;
- // Rykuta's stuffings.
- RYG_Support = 1;
- RYG_Accuracy = 0.0001; // First bullet's accuracy.
- RYG_RecoilAdd = 0.0002; // Amount of spread added per shot under time.
- RYG_RecoilSub = 0.0005; // Amount of spread reduced when gun has stopped spam firing.
- RYG_RecoilTick = 300; // Delay between each shot required for the recoil to be reduced.
- RYG_MovementPer = 125; // Percent of recoil generated due to movement.
- RYG_MaxRecoil = 0.005; // Maximum recoil can reach.
- RYG_Oversight = 0.0051; // Animation becomes more aggressive after this recoil is reached.
- RYG_MaxDmg = 7; // Max damage at optimum Range.
- RYG_MinDmg = 4; // Min damage at worst range.
- RYG_FalloffMax = 50; // Range when bullet is at lowest damage. (In TorqueUnits)
- RYG_FalloffMin = 20; // Range before bullet starts to lose damage. (In TorqueUnits)
- RYG_Headshot = 1.1; // Multiplier for head damage.
- RYG_Bipod = 0; // Gives the weapon the ability to utilize a bipod.
- RYG_BoltSound = ARBoltSound; // Sound name for bolt pull.
- RYG_ClipInSound = ARInSound; // Clip In Sound Name.
- RYG_ClipOutSound = AROutSound; // Clip Out Sound Name.
- // 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 Gun ready->fire->reload transitions as
- // well as a no-ammo->dryfire idle state.
- raycastWeaponRange = 60; //varies
- raycastWeaponTargets =
- $TypeMasks::PlayerObjectType | //AI/Players
- $TypeMasks::StaticObjectType | //Static Shapes
- $TypeMasks::TerrainObjectType | //Terrain
- $TypeMasks::VehicleObjectType | //Terrain
- $TypeMasks::FXBrickObjectType; //Bricks
- raycastExplosionProjectile = GunProjectile;
- raycastExplosionBrickSound = bulletHitSound;
- raycastExplosionPlayerSound = bulletHitSound;
- raycastDirectDamage = 2;
- raycastDirectDamageType = $DamageType::M134;
- raycastSpreadAmt = 0.001; //varies
- raycastSpreadCount = 1;
- raycastTracerProjectile = TacticalSTracerProjectile;
- raycastFromMuzzle = true;
- raycastImpactImpulse = 10;
- // Main gun functionality - - - - - - - - - - - - - - - - - - - - - - - - - - -
- stateName[0] = "Activate";
- stateTimeoutValue[0] = 0.15;
- stateTransitionOnTimeout[0] = "LoadCheckA";
- StateSequence[0] = "WindDown";
- StateSound[0] = "SmallDrawSound";
- StateScript[0] = "onMount";
- stateName[1] = "Ready";
- stateTransitionOnNoAmmo[1] = "Reload";
- stateTransitionOnTriggerDown[1] = "WindUp";
- stateAllowImageChange[1] = true;
- stateScript[1] = "onReady";
- stateName[2] = "WindUp";
- stateAllowImageChange[2] = false;
- stateTransitionOnTimeout[2] = "Fire";
- stateTimeoutValue[2] = 1.00;
- stateWaitForTimeout[2] = true;
- stateSequence[2] = "WindUp";
- stateSound[2] = M134WindUpSound;
- stateTransitionOnTriggerUp[2] = "Ready";
- stateName[3] = "Fire";
- stateTransitionOnTimeout[3] = "Smoke";
- stateTimeoutValue[3] = 0.002;
- stateFire[3] = true;
- stateAllowImageChange[3] = false;
- stateSequence[3] = "FireSpin";
- stateScript[3] = "onFire";
- stateEjectShell[3] = true;
- stateEmitter[3] = M134FireEmitter;
- stateEmitterTime[3] = 0.05;
- stateEmitterNode[3] = "muzzleNode";
- stateWaitForTimeout[3] = true;
- StateSequence[3] = "FireSpin";
- stateSound[3] = M134FireSound;
- stateName[4] = "Smoke";
- stateEmitter[4] = gunSmokeEmitter;
- stateEmitterTime[4] = 0.3;
- stateEmitterNode[4] = "muzzleNode";
- stateTimeoutValue[4] = 0.01;
- stateTransitionOnTimeout[4] = "LoadCheckA";
- StateSequence[4] = "WindDown";
- stateSound[4] = M134WindDownSound;
- // Reload checks - - - - - - - - - - - - - - - - - - - - - - - - - - -
- stateName[6] = "LoadCheckA";
- stateScript[6] = "onLoadCheck";
- stateTimeoutValue[6] = 0.01;
- stateTransitionOnTimeout[6] = "LoadCheckB";
- stateName[7] = "LoadCheckB";
- stateTransitionOnAmmo[7] = "Ready";
- stateTransitionOnNoAmmo[7] = "NoRoundsLeftA";
- // No Rounds Left States - - - - - - - - - - - - - - - - - - - - - - - -
- stateName[9] = "NoRoundsLeftA";
- stateScript[9] = "NoRoundsLeft";
- stateTimeoutValue[9] = 0.01;
- stateTransitionOnTimeout[9] = "NoRoundsLeftB";
- stateName[10] = "NoRoundsLeftB";
- stateTimeoutValue[10] = 0.01;
- stateTransitionOnNoAmmo[10] = "ReloadFull";
- stateTransitionOnTriggerDown[10] = "NoRoundsLeftC";
- stateName[11] = "NoRoundsLeftC";
- stateScript[11] = "BlankFire";
- stateTimeoutValue[11] = 0.01;
- stateTransitionOnTriggerUp[11] = "NoRoundsLeftB";
- // Reloads - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- // Regular Reload
- stateName[12] = "Reload";
- stateScript[12] = "OnClipRemoved";
- stateTimeoutValue[12] = 1.7;
- stateTransitionOnTimeout[12] = "InsertClipA";
- stateWaitForTimeout[12] = true;
- StateSequence[12] = "reload";
- stateName[13] = "InsertClipA";
- stateScript[13] = "OnClipInserted";
- stateTimeoutValue[13] = 1.5;
- stateTransitionOnTimeout[13] = "ReloadFinish";
- stateWaitForTimeout[13] = true;
- // Full Reload
- stateName[14] = "ReloadFull";
- stateScript[14] = "OnClipRemoved";
- stateTimeoutValue[14] = 1.75;
- stateTransitionOnTimeout[14] = "InsertClipB";
- stateWaitForTimeout[14] = true;
- stateName[15] = "InsertClipB";
- stateScript[15] = "OnClipInserted";
- stateTimeoutValue[15] = 1.6;
- stateTransitionOnTimeout[15] = "GunBolt";
- stateWaitForTimeout[15] = true;
- stateName[16] = "GunBolt";
- stateScript[16] = "onGunBolt";
- stateTimeoutValue[16] = 1.5;
- stateTransitionOnTimeout[16] = "ReloadFinish";
- stateWaitForTimeout[16] = true;
- // Finish reloading
- stateName[17] = "ReloadFinish";
- stateScript[17] = "OnGunReloadFinished";
- stateTimeoutValue[17] = 0.01;
- stateTransitionOnTimeout[17] = "Ready";
- stateWaitForTimeout[17] = true;
- };
Advertisement
Add Comment
Please, Sign In to add comment