Help - Search - Members - Calendar
Full Version: Predator Drone Strike
SWR Productions Forum > Game Modding and Development > Generals/Zerohour Modding
Oliver
Hi there again...

I made a specialpower/superweapon just like a MOAB, capet bombers, etc....

Game doesn't crash it goes in game perfectly.... But... When i click to lauch the predator strike... He is shy and never comes lol... What is happening?

I replaced the spydrone of airforce for this one... Is it even possible to make the scoutdrone/spydrone to be able to lauch missiles?

I made a Specialpowerobject for predator drone, he never comes and when i lauch it it says "unit lost" by eva

Here is the code: (the code was made from the a10thunderbolt)

CODE
;--------------------------------COMMAND BUTTON----------------------------------
CommandButton Command_PredatorDroneStrike
  Command           = SPECIAL_POWER
  SpecialPower      = SuperweaponPredatorDroneStrike
  Options           = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  TextLabel         = CONTROLBAR:PredatorDroneStrike
  ButtonImage       = SAPredatorStrike
  ButtonBorderType  = ACTION
  DescriptLabel     = CONTROLBAR:TooltipPredatorDroneStrike
  RadiusCursorType  = NAPALMSTRIKE
  InvalidCursorName = GenericInvalid
End

CommandButton Command_PredatorDroneStrikeFromShortcut
  Command           = SPECIAL_POWER_FROM_SHORTCUT
  SpecialPower      = SuperweaponPredatorDroneStrike
  Options           = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  TextLabel         = OBJECT:PredatorDroneStrikeShort
  ButtonImage       = SAPredatorStrike
; ButtonBorderType  = ACTION
  DescriptLabel     = CONTROLBAR:TooltipPredatorDroneStrike
  RadiusCursorType  = NAPALMSTRIKE
  InvalidCursorName = GenericInvalid
End

CommandButton Command_PurchaseSciencePredatorDroneStrike
  Command           = PURCHASE_SCIENCE
  Science           = SCIENCE_PredatorDroneStrike
  ButtonImage       = SAPredatorStrike
  ButtonBorderType  = UPGRADE; Identifier for the User as to what kind of button this is
End

;--------------------------------AIR FORCE GENERAL--------------------------------
Object AirF_AmericaCommandCenter
;I edited ModuleTag_21 which belongs to Scout drone
  Behavior           = OCLSpecialPower ModuleTag_21
    SpecialPowerTemplate = SuperWeaponPredatorDroneStrike
    OCL                  = SUPERWEAPON_PredatorDroneStrike
    CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
  End

;-----------------------------------COMMAND SET----------------------------------
;;;  NEW Air Force General;;;

CommandSet AirF_SCIENCE_AMERICA_CommandSetRank1
  1 = Command_PurchaseSciencePredatorDroneStrike
  2 = AirF_Command_PurchaseScienceCarpetBomb
  4 = Early_Command_PurchaseScienceEmergencyRepair1
END

CommandSet AirF_SpecialPowerShortcutUSA
  1 = Command_PredatorDroneStrikeFromShortcut
  2 = Command_JDAMFromShortcut
  3 = AirF_Command_A10ThunderboltMissileStrikeFromShortcut
  4 = Early_Command_EmergencyRepairFromShortcut
  5 = Command_DaisyCutterFromShortcut
  6 = Command_FireParticleUplinkCannonFromShortcut
  7 = Command_SpySatelliteScanFromShortcut
  8 = Command_CIAIntelligenceFromShortcut
  9 = AirF_Command_SpectreGunshipFromShortcut
  10 = Command_LeafletDropFromShortcut
  11 = AirF_Command_CarpetBombFromShortcut
END

CommandSet AirF_AmericaCommandCenterCommandSet
  1  = AirF_Command_ConstructAmericaDozer
  2  = AirF_Command_SpectreGunship
  4  = Command_LeafletDrop
  5  = AirF_Command_A10ThunderboltMissileStrike
  6  = Command_JDAM
  7  = Command_PredatorDroneStrike
  8  = Early_Command_EmergencyRepair
  9  = Command_DaisyCutter
10  = Command_SpySatelliteScan
13 = Command_SetRallyPoint
14 = Command_Sell
End

;-------------------------------------SCIENCE------------------------------------
Science SCIENCE_PredatorDroneStrike
  PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank1
  SciencePurchasePointCost = 1
  IsGrantable = Yes
  DisplayName = SCIENCE:AmericaPredatorDroneStrike
  Description = CONTROLBAR:ToolTipUSASciencePredatorDroneStrike
End

;----------------------------------SPECIAL POWER-------------------------------------------
SpecialPower SuperweaponPredatorDroneStrike
  Enum                = SPECIAL_NAPALM_STRIKE
  ReloadTime          = 120000; in milliseconds
  RequiredScience     = SCIENCE_PredatorDroneStrike
  PublicTimer         = No
  SharedSyncedTimer   = Yes
  ViewObjectDuration  = 30000
  ViewObjectRange     = 250
  RadiusCursorRadius  = 50
  ShortcutPower       = Yes;Capable of being fired by the side-bar shortcut.
  AcademyClassify     = ACT_SUPERPOWER;Considered a powerful special power that a player could fire. Not for simpler unit based powers.
End

;----------------------------------WEAPON OBJECTS--------------------------------
Object PredatorDroneMissile

; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = AVWarthog_M
      ParticleSysBone = NONE MissileExhaust
    End
    ConditionState = JAMMED
      ParticleSysBone = None SparksMedium
    End
  End

; ***DESIGN parameters ***
  DisplayName      = OBJECT:Missile
  Side = America
  EditorSorting   = SYSTEM
  TransportSlotCount = 1;how many "slots" we take in a transport (0 == not transportable)
  VisionRange = 0.0  
  ArmorSet
    Conditions      = None
    Armor           = ProjectileArmor
    DamageFX        = None
  End

; *** AUDIO Parameters ***

; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD CAN_CAST_REFLECTIONS PROJECTILE SMALL_MISSILE
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0

; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
; A projectile is not disabled, but instead loses target and scatters
    SubdualDamageCap = 200
    SubdualDamageHealRate = 100000
    SubdualDamageHealAmount = 50
  End

; ---- begin Projectile death behaviors
  Behavior = InstantDeathBehavior DeathModuleTag_01
    DeathTypes = NONE +DETONATED
; we detonated normally.
; no FX, just quiet destroy ourselves
  End
  Behavior = InstantDeathBehavior DeathModuleTag_02
    DeathTypes = NONE +LASERED
; shot down by laser.
    FX         = FX_GenericMissileDisintegrate
    OCL        = OCL_GenericMissileDisintegrate
  End
  Behavior = InstantDeathBehavior DeathModuleTag_03
    DeathTypes = ALL -LASERED -DETONATED
; shot down by nonlaser.
    FX         = FX_GenericMissileDeath
  End
; ---- end Projectile death behaviors

  Behavior = PhysicsBehavior ModuleTag_08
    Mass = 1
  End
  Behavior = MissileAIUpdate ModuleTag_09
    TryToFollowTarget = Yes
    FuelLifetime = 10000
    InitialVelocity = 30        ; in dist/sec
    IgnitionDelay = 0
    IgnitionFX = FX_A10ThunderboltMissileIgnition
  End
; It's a missile, it needs to hit so it can +DETONATED
;  Behavior = HeightDieUpdate ModuleTag_10
;    TargetHeight = 1.0
;    TargetHeightIncludesStructures = No
;  End
  Locomotor = SET_NORMAL A10ThunderboltMissileLocomotor

  Geometry = Sphere
  GeometryIsSmall = Yes
  GeometryMajorRadius = 1.0

  Behavior = SpecialPowerCompletionDie ModuleTag_11
    SpecialPowerTemplate = SuperweaponPredatorDroneStrike
  End

;  Geometry = Sphere
; GeometryIsSmall = Yes
;GeometryMajorRadius = 12.0

End

;-----------------------------------WEAPON----------------------------------------
Weapon PredatorDroneMissileWeapon
  PrimaryDamage         = 200.0;GS changed to what it was secretly doing pending review      
  PrimaryDamageRadius   = 50.0      
  AttackRange           = 350.0
  DamageType            = EXPLOSION
  DeathType             = EXPLODED
  WeaponSpeed           = 99999.0            
  ProjectileDetonationFX = FX_PredatorDroneMissileExplosion
  RadiusDamageAffects   = ENEMIES NEUTRALS ALLIES NOT_SIMILAR
  DelayBetweenShots     = 0; time between shots, msec
  ClipSize              = 1; how many shots in a Clip (0 == infinite)
  ClipReloadTime        = 20000; how long to reload a Clip, msec
  AutoReloadsClip       = No
End

; ----------------------------OBJECT CREATION LIST-------------------------------
ObjectCreationList SUPERWEAPON_PredatorDroneStrike
  DeliverPayload
    Transport                       = AmericaVehiclePredatorDrone
    StartAtPreferredHeight          = Yes
    StartAtMaxSpeed                 = Yes
    MaxAttempts                     = 1        ;max attempts
    DropDelay                       = 500;time in between each set of items dropped (if more than one)
    DeliveryDistance                = 450;distance from target allowed to start/stop dropping.
    VisibleItemsDroppedPerInterval  = 1        ;Drops one missil at a time
    VisibleDropBoneBaseName         = WeaponA;The bombs are created and dropped at this bone base
    VisibleSubObjectBaseName        = Missile;The bombs are visible until dropped.
    VisibleNumBones                 = 2        ;Number of bones.
    VisiblePayloadTemplateName      = PredatorDroneMissile;Created when payload is dropped.
    VisiblePayloadWeaponTemplate    = PredatorDroneMissileWeapon
    InheritTransportVelocity        = Yes;The bombs will start at transport velocity.
    ExitPitchRate                   = 30    ;The bomb will pitch down.
    DiveStartDistance               = 500
    DiveEndDistance                 = 300
    DeliveryDecalRadius = 50
    DeliveryDecal
      Texture           = SCCNapalmStrike_China
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 500
      Color             = R:255 G:156 B:0 A:255
      OnlyVisibleToOwningPlayer = Yes
    End
  End
End

; -------------------------------------FX LIST-------------------------------------
FXList FX_PredatorDroneMissileExplosion

  ParticleSystem
    Name = CarpetBombExplosion
   InitialDelay = 0 0 UNIFORM;In milliseconds
    Offset = X:0.0 Y:0.0 Z:0.0
  End

  ParticleSystem
    Name = CarpetBombWave
   InitialDelay = 0 0 UNIFORM;In milliseconds
    Offset = X:0.0 Y:0.0 Z:0.0
  End

  ParticleSystem
    Name = CarpetBombExplosionPuff
   InitialDelay = 0 0 UNIFORM;In milliseconds
    Offset = X:0.0 Y:0.0 Z:0.0
  End

  ParticleSystem
    Name = BombTruckDefaultExplosionArms
    Offset = X:0.0 Y:0.0 Z:2.0
  End

  ParticleSystem
    Name = BombTruckDefaultLenzFlare
    Offset = X:0.0 Y:0.0 Z:1.0
  End

  ParticleSystem
    Name = BombTruckDefaultExplosionTrailArms
    InitialDelay = 100 100 UNIFORM;In milliseconds
    Offset = X:0.0 Y:0.0 Z:25.0
  End

  Sound
    Name = ExplosionCarpetBomb
  End
End

;--------------------------SPECIAL POWERS OBJECTS--------------------------------------------------
Object AmericaVehiclePredatorDrone

; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    ConditionState = NONE
      Model = AVScoutDr
      Animation = AVScoutDr.AVScoutDr
      AnimationMode = LOOP
    End

    ConditionState = REALLYDAMAGED
      Model = AVScoutDr_d
      Animation = AVScoutDr_d.AVScoutDr_d
      AnimationMode = LOOP
    End
  End

; ***DESIGN parameters ***
  DisplayName      = OBJECT:ScoutDrone
  Side = America
  EditorSorting   = VEHICLE
  TransportSlotCount = 0        ;how many "slots" we take in a transport (0 == not transportable)
  ArmorSet
    Conditions      = None
    Armor           = TankArmor
    DamageFX        = SmallTankDamageFX
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End
  
; *** AUDIO Parameters ***
  SoundAmbient = NoSound
  SoundAmbientRubble    = NoSound
  SoundStealthOn  = StealthOn
  SoundStealthOff = StealthOff

; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK  VEHICLE SCORE TRANSPORT AIRCRAFT IGNORED_IN_GUI EMP_HARDENED
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 60   // turn rate, in degrees per sec
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL DroneLocomotor
  Behavior = StealthDetectorUpdate ModuleTag_04
    DetectionRate   = 500; how often to rescan for stealthed things in my sight (msec)
;DetectionRange = ???;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No;Contained means being in a transport or tunnel network.
  End
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 50.0
    KillWhenRestingOnGround = Yes
    AllowBouncing = No
  End

  Behavior = SlavedUpdate ModuleTag_06
    GuardMaxRange = 35;How far away from master I'm allowed when master is idle (doesn't wander)
    GuardWanderRange = 35;How far away I'm allowed to wander from master while guarding.
    AttackRange = 75     ;How far away from master I'm allowed when master is attacking a target.
    AttackWanderRange = 10;How far I'm allowed to wander from target.
    ScoutRange = 75;How far away from master I'm allowed when master is moving.
    ScoutWanderRange = 10;How far I'm allowed to wander from scout point.
    DistToTargetToGrantRangeBonus = 20;How close I have to be to the master's target in order to grant master a range bonus.
    StayOnSameLayerAsMaster = Yes
  End

  Behavior = MaxHealthUpgrade ModuleTag_07
    TriggeredBy   = Upgrade_AmericaDroneArmor
    AddMaxHealth  = 25.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Behavior = DestroyDie ModuleTag_08
    DeathTypes = ALL
  End
  Behavior                 = CreateObjectDie ModuleTag_09
    DeathTypes = ALL
    CreationList      = OCL_AmericaScoutDroneExplode
  End
  Behavior                 = FXListDie ModuleTag_10
    DeathTypes = ALL
    DeathFX           = FX_AmericaScoutDroneExplode
  End
  
  Behavior                 = TransitionDamageFX ModuleTag_11
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleDroneDamageTransitionSmall
  End

  Behavior = UpgradeDie  ModuleTag_12
;This frees the object based upgrade for the producer object.
   DeathTypes = ALL
   UpgradeToRemove      = Upgrade_AmericaScoutDrone ModuleTag_13
  End

  Behavior    = OCLSpecialPower ModuleTag_14
    SpecialPowerTemplate = SuperweaponPredatorDroneStrike;@@KRIS@@
    OCL                  = SUPERWEAPON_PredatorDroneStrike
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3    ; taking this much damage...
    AflameDamageDelay = 500    ; this often.
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 5.0
  GeometryMinorRadius = 6.0
  GeometryHeight = 3.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89; minimum elevation angle above horizon. Used to limit shadow length

End
n5p29
why don't you just use A10 plane when you make the drone object? it's much more closer than the scout drone.
Oliver
QUOTE (n5p29 @ 1 Sep 2013, 9:53) *
why don't you just use A10 plane when you make the drone object? it's much more closer than the scout drone.


Yh ur right, never thought about that, its working perfectly now, its so sweet biggrin.gif

But i have a thing... I am not gaining experience when i destroy units
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.