Help - Search - Members - Calendar
Full Version: Firing both primary and secondary
SWR Productions Forum > Game Modding and Development > Generals/Zerohour Modding
Oliver
Ok i have the model of the MLRS (MRLS) from the Shockwave 0.93 mod and you have to choose from which slot u want to fire...

I've tried to make it fire both type of missiles (1 of the big one "SECONDARY" and 6 of the small ones "PRIMARY") but no sucess... I even tried to look to humvee code and an overlord from reborn v.6

How do i do it to make both Primary and Secondary to fire at same time?

Object code:
CODE
;-----------------------Supweapon general----------------------
Object SupW_AmericaVehicleMLRS

; *** ART Parameters ***
  SelectPortrait         = SAMLRS_L
  ButtonImage            = SAMLRS

  UpgradeCameo1 = Upgrade_AmericaBattleDrone
  UpgradeCameo2 = Upgrade_AmericaScoutDrone
  UpgradeCameo3 = Upgrade_AmericaHellfireDrone
  UpgradeCameo4 = Upgrade_AmericaAdvancedTraining

  Draw = W3DTankDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = avm270
      Turret = TURRET
      TurretPitch = TURRETEL
      WeaponLaunchBone = PRIMARY WeaponA
      WeaponFireFXBone = PRIMARY Muzzle
      WeaponLaunchBone = SECONDARY WeaponB
      WeaponFireFXBone = SECONDARY MuzzleB
    End

    ConditionState = REALLYDAMAGED
      Model = avm270_d
    End
    AliasConditionState = RUBBLE

    TrackMarks = EXTnkTrack.tga

  End

; ***DESIGN parameters ***
  DisplayName      = OBJECT:MLRS
  Side = AmericaSuperWeaponGeneral
  EditorSorting   = VEHICLE
  TransportSlotCount = 3                ;how many "slots" we take in a transport (0 == not transportable)
  BuildCost       = 1800
  BuildTime       = 20.0         ;in seconds
  VisionRange     = 180
  ShroudClearingRange = 200
  Prerequisites
    Object = SupW_AmericaWarFactory
    Object = SupW_AmericaStrategyCenter
  End
  ExperienceValue = 50 50 100 150   ;Experience point value at each level
  ExperienceRequired = 0 200 400 800 ;Experience points needed to gain each level
  IsTrainable = Yes            ;Can gain experience
  WeaponSet
    Conditions = None
    Weapon = PRIMARY MLRSWeapon
    Weapon = SECONDARY MLRSMissileWeapon
    AutoChooseSources = SECONDARY NONE
    ShareWeaponReloadTime = Yes
    WeaponLockSharedAcrossSets = Yes
  End
  ArmorSet
    Conditions      = None
    Armor           = TruckArmor
    DamageFX        = TankDamageFX
  End
  CrusherLevel           = 2 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2 ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = SupW_AmericaVehicleMLRSCommandSet

; *** AUDIO Parameters ***
  VoiceSelect = MRLSVoiceSelect
  VoiceMove = MRLSVoiceMove
  VoiceGuard = MRLSVoiceMove
  VoiceAttack = MRLSVoiceAttack
  SoundMoveStart = MRLSMoveStart
  SoundMoveStartDamaged = MRLSMoveStart
  UnitSpecificSounds
    VoiceCreate = MRLSVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = TurretMoveLoopLoud
    SoundEject = PilotSoundEject
    VoiceEject = PilotVoiceEject
    VoiceCrush = MRLSVoiceMove
    VoiceEnter = MRLSVoiceMove
    VoiceBombard = MRLSVoiceAttack
  End

; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE DONT_AUTO_CRUSH_INFANTRY CAN_ATTACK CAN_CAST_REFLECTIONS VEHICLE SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 220.0
    InitialHealth   = 220.0
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 40  ; turn rate, in degrees per sec
      TurretPitchRate = 35
      FirePitch = 35 ; Instead of aiming pitchwise at the target, it will aim here
      AllowsPitch = Yes
      ControlledWeaponSlots = PRIMARY SECONDARY
    End
    AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
  End
  Locomotor = SET_NORMAL TomahawkLocomotor

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 75.0
  End
  Behavior = SlowDeathBehavior ModuleTag_05
    DeathTypes = ALL -CRUSHED -SPLATTED
    DestructionDelay  = 500
    DestructionDelayVariance  = 100
    FX  = INITIAL  FX_GenericTankDeathEffect
    OCL = MIDPOINT OCL_AmericaVehicleMLRS
    FX =  FINAL FX_AmericaVehicleTomahawkDeathExplosion
  End

  Behavior = ObjectCreationUpgrade ModuleTag_06
    UpgradeObject = OCL_AmericanBattleDrone
    TriggeredBy   = Upgrade_AmericaBattleDrone
    ConflictsWith = Upgrade_AmericaScoutDrone Upgrade_AmericaHellfireDrone
  End
  Behavior = ObjectCreationUpgrade ModuleTag_07
    UpgradeObject = OCL_AmericanScoutDrone
    TriggeredBy   = Upgrade_AmericaScoutDrone
    ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaHellfireDrone
  End
  Behavior = ObjectCreationUpgrade ModuleTag_08
    UpgradeObject = OCL_AmericanHellfireDrone
    TriggeredBy   = Upgrade_AmericaHellfireDrone
    ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaScoutDrone
  End

  Behavior = ProductionUpdate ModuleTag_09
    MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_10
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0;Increases experience gained by an additional 100%
  End

  Behavior = WeaponSetUpgrade ModuleTag_11
    TriggeredBy   = Upgrade_Veterancy_HEROIC
  End

  Behavior = DestroyDie ModuleTag_12
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  Behavior = FXListDie ModuleTag_13
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  Behavior = CreateObjectDie ModuleTag_14
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_CrusaderTank_CrushEffect
  End

  Behavior = EjectPilotDie ModuleTag_15
    DeathTypes = ALL -CRUSHED -SPLATTED
    ExemptStatus = HIJACKED
    VeterancyLevels =  ALL -REGULAR;only vet+ gives pilot
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
  End

  Behavior = TransitionDamageFX ModuleTag_16
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

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

  Geometry = BOX
  GeometryMajorRadius = 20.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End


Weapon Code:
CODE
Weapon MLRSWeapon
  PrimaryDamage           = 70.0
  PrimaryDamageRadius     = 20.0
  SecondaryDamage         = 35.0          
  SecondaryDamageRadius   = 40.0
  ScatterRadius           = 35.0
  AttackRange             = 350.0
  MinimumAttackRange      = 180.0
  DamageType              = EXPLOSION;INFANTRY_MISSILE
  DeathType               = EXPLODED
  WeaponSpeed             = 200        ; dist/sec
  ProjectileObject        = MLRSMissile
  FireFX                  = WeaponFX_MLRSLaunching
  FireSound               = MLRSWeapon
  ProjectileDetonationFX  = FX_ATACMExplosion
  RadiusDamageAffects     = SUICIDE SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots       = 300
  ClipSize                = 6
  ClipReloadTime          = 8000
  PreAttackDelay          = 250
  PreAttackType           = PER_CLIP
  AntiAirborneVehicle         = Yes
  ProjectileCollidesWith      = STRUCTURES
End

Weapon MLRSMissileWeapon
  PrimaryDamage               = 400.0            
  PrimaryDamageRadius         = 40.0      
  SecondaryDamage             = 200.0          
  SecondaryDamageRadius       = 80.0    
  ScatterRadius               = 10.0
  AttackRange                 = 350.0
  MinimumAttackRange      = 180.0
  DamageType              = EXPLOSION
  DeathType               = EXPLODED
  WeaponSpeed             = 180        ; dist/sec
  ProjectileObject        = MLRSTacticleBalisticMissile
  FireFX                  = WeaponFX_MLRSLaunching
  FireSound               = MLRSATACMWeapon
  ProjectileDetonationFX  = WeaponFX_TopolMissileDetonationExplosive
  RadiusDamageAffects     = SUICIDE SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  ClipSize                = 1
  ClipReloadTime          = 8000
  PreAttackDelay          = 250
  PreAttackType           = PER_CLIP
  AntiAirborneVehicle         = Yes
  ProjectileCollidesWith      = STRUCTURES
End
MyDude25
I think its quite impossible to make a unit use both slots at the same time.
Oliver
QUOTE (Kris @ 2 Nov 2013, 1:09) *
I think its quite impossible to make a unit use both slots at the same time.


Well, the AI uses it!!! The cheater AI ... Why can't I? lol

And besides, in Reborn mod there is a vehicle that uses 3 slots... So I think it's pretty possible.. but i did so far was making the AI using both

I replaced the weaponsets of the code above with this...

CODE
  WeaponSet
    Conditions                 = None
    Weapon                     = PRIMARY MLRSWeapon
    PreferredAgainst           = PRIMARY STRUCTURE
    Weapon                     = SECONDARY MLRSMissileWeapon
    PreferredAgainst           = SECONDARY VEHICLE INFANTRY
   ;AutoChooseSources          = SECONDARY NONE
   ;ShareWeaponReloadTime      = Yes
   ;WeaponLockSharedAcrossSets = Yes
  End

  WeaponSet
    Conditions                 = PLAYER_UPGRADE
    Weapon                     = PRIMARY HeroicMLRSWeapon
    PreferredAgainst           = PRIMARY STRUCTURE
    Weapon                     = SECONDARY HeroicMLRSMissileWeapon
    PreferredAgainst           = SECONDARY VEHICLE INFANTRY
   ;ShareWeaponReloadTime      = Yes
   ;WeaponLockSharedAcrossSets = Yes
  End
Zeke
QUOTE (Kris @ 2 Nov 2013, 7:09) *
I think its quite impossible to make a unit use both slots at the same time.


Comanche?

QUOTE (Oliver @ 2 Nov 2013, 7:50) *
I replaced the weaponsets of the code above with this...

CODE
  WeaponSet
    Conditions                 = None
    Weapon                     = PRIMARY MLRSWeapon
    PreferredAgainst           = PRIMARY STRUCTURE
    Weapon                     = SECONDARY MLRSMissileWeapon
    PreferredAgainst           = SECONDARY VEHICLE INFANTRY
  ;AutoChooseSources          = SECONDARY NONE
  ;ShareWeaponReloadTime      = Yes
  ;WeaponLockSharedAcrossSets = Yes
  End

  WeaponSet
    Conditions                 = PLAYER_UPGRADE
    Weapon                     = PRIMARY HeroicMLRSWeapon
    PreferredAgainst           = PRIMARY STRUCTURE
    Weapon                     = SECONDARY HeroicMLRSMissileWeapon
    PreferredAgainst           = SECONDARY VEHICLE INFANTRY
  ;ShareWeaponReloadTime      = Yes
  ;WeaponLockSharedAcrossSets = Yes
  End


And did that work?
Oliver
QUOTE (Zeke @ 2 Nov 2013, 5:49) *
And did that work?


Not quite, the AI uses it a lot... That was my main worry... But when i use it, it doesnt respect the "PreferredAgainst"... It fires both PRIMARY and SECONDARY to vehicles and infantry
Zeke
QUOTE (Oliver @ 2 Nov 2013, 22:27) *
It fires both PRIMARY and SECONDARY to vehicles and infantry


I'm confused, I thought that's what you we're asking for:

QUOTE (Oliver @ 2 Nov 2013, 0:12) *
How do i do it to make both Primary and Secondary to fire at same time?


Preferred Against only works if you put only one target type in the field like how the manche has PreferredAgainst = PRIMARY INFANTRY only.
Oliver
QUOTE (Zeke @ 2 Nov 2013, 17:13) *
I'm confused, I thought that's what you we're asking for:



Preferred Against only works if you put only one target type in the field like how the manche has PreferredAgainst = PRIMARY INFANTRY only.


Yh your right, was overextending the topic.. Sorry

Its ok now thanks
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.