home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / GermanFlak.script < prev    next >
Encoding:
Text File  |  2001-12-14  |  3.1 KB  |  124 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CGermanFlakMesh
  11. {
  12.   string MeshFile = "Models/G_Flak.mesh";
  13.   string SkinFile = "Models/G_Flak.skin";
  14.   string AnimFile = "Models/G_Flak.anim";
  15. }
  16.  
  17. class CGermanFlakStateControl extends CUnitLifeControl
  18. {
  19.   void CGermanFlakStateControl()
  20.   {
  21.     CUnitLifeControl(1000.0);
  22.     m_DestroyPause = 7.5;
  23.     m_ExplosionId  = "EXPLID_GermanFlakExplosion";
  24.   }
  25. }
  26.  
  27. class CGermanFlakTargetingAnimator
  28. {
  29.   string HorAnimName    = "tower";
  30.   string VerAnimName    = "gun";
  31.  
  32.   float  LeftEndAngle   = -180.0;
  33.   float  RightEndAngle  =  180.0;
  34.   float  TopEndAngle    =  0.0;
  35.   float  BottomEndAngle =  60.0;
  36.  
  37.   float  MaxAngleSpeed  = 180.0;
  38. }
  39.  
  40. class CGermanFlakGun extends CBaseWeaponDescriptor
  41. {
  42.   int    AmmoQuantity      = -1;
  43.   float  BulletSpeed       = 500.0;
  44.   float  FireDeviation     = 0.015;
  45.   string BulletPatternId   = "BULLETID_GermanFlakGunBullet";
  46.   string LinkJointName     = "_Gun_Fire_01";
  47.   string EffectOnFire      = "EFFECTID_FlakGunFireEffect";
  48.   string FireCloudEffect   = "EFFECTID_FlakGunFireCloudEffect";
  49.   string SoundOnFire       = "SOUNDID_FlakGunFireSound";
  50.  
  51.   string WeaponName        = "Gun";
  52.   float  FireWeaponDelay   = 0.8;
  53.   bool   IsAutotargeting   = false;
  54.   int    AttachSlotNumber  = 1;
  55. }
  56.  
  57. class CGermanFlakBehavior extends
  58.     CBaseBehavior, CGermanFlakFireParameters
  59. {
  60.   bool CanMove = false;
  61.  
  62.   void CGermanFlakBehavior()
  63.   {
  64.     CBaseBehavior();
  65.   }
  66. }
  67.  
  68. class CGermanFlakFireParameters
  69. {
  70.   bool CanFire = true;
  71.  
  72.   int  FirePeriod        = 2000;//400; // ms
  73.   int  FirePeriodRandAdd = 1000;//0; // ms
  74.   int  ShootGunNum = 1;
  75.  
  76.   bool BurstFire         = false;//true;
  77.   int  BurstTime         = 2000; // ms
  78.   int  BurstTimeRandAdd  = 0; // ms
  79.  
  80.   int  BurstDelay        = 3000; // ms
  81.   int  BurstDelayRandAdd = 2000; // ms
  82.  
  83. // radar
  84.  
  85.   bool  HasRadar = true;
  86.  
  87.   float MaxRadarDistance = 1500; // m
  88.   float MinRadarDistance = 30;   // m
  89.  
  90.   int   UpdateRadarPeriod        = 3000; // ms
  91.   int   UpdateRadarPeriodRandAdd = 1000; // ms
  92.  
  93.   bool  FireFlying = true;
  94.   bool  FireGround = false;
  95. };
  96.  
  97. class CBaseGermanFlak extends
  98.   CBuilding, CUnitWithStateControl, CUnitWithBehavior, CArmedUnit
  99. {
  100.   void CBaseGermanFlak()
  101.   {
  102.     InitializeModelAsAnimated("CGermanFlakMesh");
  103.     CUnitWithStateControl("CGermanFlakStateControl");
  104.     CreateAnimatedWeapon("Weapon", "CGermanFlakGun", "CGermanFlakTargetingAnimator");
  105.     InitializeVehicleBehavior("CGermanFlakBehavior");
  106.  
  107.     Core_AddClassificator("German");
  108.     Core_AddClassificator("Flak");        // for cockpit identification
  109.     Core_AddClassificator("GroundUnit"); // for behavior fire logic
  110.   }
  111. }
  112.  
  113.  
  114. class CMountedGermanFlak extends CBaseGermanFlak
  115. {
  116.   void CMountedGermanFlak()
  117.   {
  118.     InitializeGroundControl();
  119.   }
  120. }
  121.  
  122.  
  123.  
  124.