Here is a working gun... locks on minimal heat, could be made better.. Code: -------------------------------------------------------------------------------- //-------------------------------------- // Seeker Disc launcher - none advanced model 0.1, basic code by -Defender // This gun locks on minimal heat, unlike the missler.. // This is not any thing advanced here, just some thing to get beginers excited.. //-------------------------------------- //-------------------------------------------------------------------------- // Projectile //-------------------------------------- datablock SeekerProjectileData(SeekDiscProjectile) { projectileShapeName = "disc.dts"; hasDamageRadius = true; indirectDamage = 0.50; damageRadius = 7.0; radiusDamageType = $DamageType::Disc; kickBackStrength = 2000; explosion = "DiscExplosion"; underwaterExplosion = "UnderwaterDiscExplosion"; splash = DiscSplash; velInheritFactor = 1.0; // to compensate for slow starting velocity, this value // is cranked up to full so the missile doesn't start // out behind the player when the player is moving // very quickly - bramage baseEmitter = ChaingunFireEmitter; lifetimeMS = 6000; muzzleVelocity = 10.0; maxVelocity = 80.0; turningSpeed = 110.0; acceleration = 200.0; proximityRadius = 9; terrainAvoidanceSpeed = 180; terrainScanAhead = 25; terrainHeightFail = 12; terrainAvoidanceRadius = 100; flareDistance = 200; flareAngle = 30; sound = discProjectileSound; hasLight = true; lightRadius = 6.0; lightColor = "0.175 0.175 0.5"; explodeOnWaterImpact = false; }; //-------------------------------------------------------------------------- // Ammo //-------------------------------------- datablock ItemData(SeekerDisclauncherAmmo) { className = Ammo; catagory = "Ammo"; shapeFile = "ammo_disc.dts"; mass = 1; elasticity = 0.2; friction = 0.6; pickupRadius = 2; pickUpName = "some Discs"; computeCRC = true; }; //-------------------------------------------------------------------------- // Weapon //-------------------------------------- datablock ItemData(SeekerDisclauncher) { className = Weapon; catagory = "Spawn Items"; shapeFile = "weapon_disc.dts"; image = SeekerDisclauncherImage; mass = 1; elasticity = 0.2; friction = 0.6; pickupRadius = 2; pickUpName = "a seeker disc launcher"; computeCRC = true; emap = true; }; datablock ShapeBaseImageData(SeekerDisclauncherImage) { className = WeaponImage; shapeFile = "weapon_disc.dts"; item = SeekerDisclauncher; ammo = SeekerDisclauncherAmmo; offset = "0 0 0"; //armThread = lookms; emap = true; projectile = SeekDiscProjectile; projectileType = SeekerProjectile; isSeeker = true; seekRadius = 1200; maxSeekAngle = 16; seekTime = 0.50; minSeekHeat = 0.0; // only target objects outside this range minTargetingDistance = 15; stateName[0] = "Activate"; stateTransitionOnTimeout[0] = "ActivateReady"; stateTimeoutValue[0] = 0.5; stateSequence[0] = "Activate"; stateSound[0] = DiscSwitchSound; stateName[1] = "ActivateReady"; stateTransitionOnLoaded[1] = "Ready"; stateTransitionOnNoAmmo[1] = "NoAmmo"; stateName[2] = "Ready"; stateTransitionOnNoAmmo[2] = "NoAmmo"; stateSequence[2] = "DiscSpin"; stateSound[2] = DiscLoopSound; stateTransitionOnTriggerDown[2] = "CheckWet"; stateName[3] = "Fire"; stateTransitionOnTimeout[3] = "Reload"; stateTimeoutValue[3] = 0.4; stateFire[3] = true; stateRecoil[3] = LightRecoil; stateAllowImageChange[3] = false; stateSequence[3] = "Fire"; stateScript[3] = "onFire"; stateSound[3] = DiscFireSound; stateName[4] = "Reload"; stateTransitionOnNoAmmo[4] = "NoAmmo"; stateTransitionOnTimeout[4] = "Ready"; stateTimeoutValue[4] = 1.0; stateAllowImageChange[4] = false; stateSequence[4] = "Reload"; stateSound[4] = DiscReloadSound; stateName[5] = "NoAmmo"; stateTransitionOnAmmo[5] = "Reload"; stateSequence[5] = "NoAmmo"; stateTransitionOnTriggerDown[5] = "DryFire"; stateName[6] = "DryFire"; stateSound[6] = DiscDryFireSound; stateTimeoutValue[6] = 1.0; stateTransitionOnTimeout[6] = "ActivateReady"; stateName[7] = "CheckTarget"; stateTransitionOnNoTarget[7] = "DryFire"; stateTransitionOnTarget[7] = "Fire"; stateName[8] = "CheckWet"; stateTransitionOnWet[8] = "WetFire"; stateTransitionOnNotWet[8] = "CheckTarget"; stateName[9] = "WetFire"; stateTransitionOnNoAmmo[9] = "NoAmmo"; stateTransitionOnTimeout[9] = "Reload"; stateSound[9] = DiscFireSound; stateRecoil[3] = LightRecoil; stateTimeoutValue[9] = 0.4; stateSequence[3] = "Fire"; stateScript[9] = "onWetFire"; stateAllowImageChange[9] = false; }; function SeekerDisclauncherImage::onFire(%data,%obj,%slot) { %p = Parent::onFire(%data, %obj, %slot); MissileSet.add(%p); %target = %obj.getLockedTarget(); if(%target) %p.setObjectTarget(%target); else if(%obj.isLocked()) %p.setPositionTarget(%obj.getLockedPosition()); else %p.setNoTarget(); } function SeekerDisclauncherImage::onWetFire(%data, %obj, %slot) { %p = Parent::onFire(%data, %obj, %slot); MissileSet.add(%p); %p.setObjectTarget(0); }