Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- datablock AITurretShapeData(AITurret)
- {
- category = "Turrets";
- shapeFile = "art/shapes/weapons/Turret/Turret_Legs.DAE";
- maxDamage = 70;
- destroyedLevel = 70;
- explosion = GrenadeExplosion;
- simpleServerCollision = false;
- zRotOnly = false;
- // Rotation settings
- minPitch = 15;
- maxPitch = 80;
- maxHeading = 90;
- headingRate = 50;
- pitchRate = 50;
- // Scan settings
- maxScanPitch = 10;
- maxScanHeading = 30;
- maxScanDistance = 20;
- trackLostTargetTime = 2;
- maxWeaponRange = 30;
- weaponLeadVelocity = 0;
- // Weapon mounting
- numWeaponMountPoints = 1;
- weapon[0] = AITurretHead;
- weaponAmmo[0] = AITurretAmmo;
- weaponAmmoAmount[0] = 10000;
- maxInv[AITurretHead] = 1;
- maxInv[AITurretAmmo] = 10000;
- // Initial start up state
- stateName[0] = "Preactivate";
- stateTransitionOnAtRest[0] = "Scanning";
- stateTransitionOnNotAtRest[0] = "Thrown";
- // Scan for targets
- stateName[1] = "Scanning";
- stateScan[1] = true;
- stateTransitionOnTarget[1] = "Target";
- stateSequence[1] = "scan";
- stateScript[1] = "OnScanning";
- // Have a target
- stateName[2] = "Target";
- stateTransitionOnNoTarget[2] = "NoTarget";
- stateTransitionOnTimeout[2] = "Firing";
- stateTimeoutValue[2] = 2.0;
- stateScript[2] = "OnTarget";
- // Fire at target
- stateName[3] = "Firing";
- stateFire[3] = true;
- stateTransitionOnNoTarget[3] = "NoTarget";
- stateScript[3] = "OnFiring";
- // Lost target
- stateName[4] = "NoTarget";
- stateTransitionOnTimeout[4] = "Scanning";
- stateTimeoutValue[4] = 2.0;
- stateScript[4] = "OnNoTarget";
- // Player thrown turret
- stateName[5] = "Thrown";
- stateTransitionOnAtRest[5] = "Deploy";
- stateSequence[5] = "throw";
- stateScript[5] = "OnThrown";
- // Player thrown turret is deploying
- stateName[6] = "Deploy";
- stateTransitionOnTimeout[6] = "Scanning";
- stateTimeoutValue[6] = 2.5;
- stateSequence[6] = "deploy";
- stateScaleAnimation[6] = true;
- stateScript[6] = "OnDeploy";
- // Special state that is set when the turret is destroyed.
- // This state is set in the onDestroyed() callback.
- stateName[7] = "Destroyed";
- stateSequence[7] = "destroyed";
- };
Advertisement