Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
7 years ago
I was curious if airborne Dozers worked in Zero Hour, so I have the USA Dozer the Comanche's locomotor. And presto, with no issues whatsoever, it worked like a charm.

So naturally I took it to the next step. I started creating a unit for the Air Force General called the Airgineer, which functionally is a slightly beefier Comanche with half as effective weaponry but with the ability to heal other aircraft, create buildings, and repair buildings.

However I seem to have an issue where my new Airgineer can't move or do anything, he just sits there on the ground.

Really not sure what's wrong here. Any thoughts?






;------------------------------------------------------------------------------
;Airgineer flying Dozer.
;Weaker weapons than Comanche and does not benefit from Stealth upgrade
;But has better armor, heals aircraft and vehicles, and creates buildings.
;Will create TF2 Engineer voice lines for this unit later.

Object AirF_AmericaVehicleAirgineer

  ; *** ART Parameters ***
  SelectPortrait         = SACCommanche_L
  ButtonImage            = SACCommanche_L
  
  UpgradeCameo1 = Upgrade_ComancheRocketPods
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo4 = AirF_Upgrade_StealthComanche ;not no more
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model                           = AVComanche
      HideSubObject                   = MissileUpgrade
      Animation                       = AVComanche.AVComanche
      AnimationMode                   = LOOP
      WeaponMuzzleFlash               = PRIMARY TurretFX
      WeaponFireFXBone                = PRIMARY Muzzle
      WeaponFireFXBone                = SECONDARY Muzzle
      WeaponLaunchBone  = SECONDARY Muzzle
    End

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

    ConditionState = WEAPONSET_PLAYER_UPGRADE
      ShowSubObject                   = MissileUpgrade
      Animation                       = AVComanche.AVComanche
      AnimationMode                   = LOOP
      WeaponFireFXBone                = TERTIARY WeaponB
      WeaponLaunchBone  = TERTIARY WeaponB
    End

    ConditionState = WEAPONSET_PLAYER_UPGRADE REALLYDAMAGED
      Model                           = AVComanche_d
      ShowSubObject                   = MissileUpgrade
      Animation                       = AVComanche_d.AVComanche_d
      AnimationMode                   = LOOP
      WeaponFireFXBone                = TERTIARY WeaponB
      WeaponLaunchBone  = TERTIARY WeaponB
    End

    ConditionState = RUBBLE
      Model                           = AVComanche_d
      Animation                       = AVComanche_d.AVComanche_d
      AnimationMode                   = LOOP
    End

    ConditionState = RUBBLE SPECIAL_DAMAGED
      Model                           = AVComanche_d
      HideSubObject                   = AVComanche_Prop
    End

    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Airgineer
  EditorSorting       = VEHICLE
  Side                = AmericaAirForceGeneral
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 200.0 
  ShroudClearingRange = 600
  Prerequisites
    Object            = AirF_AmericaAirfield
  End

  WeaponSet
    Conditions          = None 
    ; -----
    Weapon              = PRIMARY     DozerComanche20mmCannonWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   DozerComancheAntiTankMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    NONE
  End
  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    ; -----
    Weapon              = PRIMARY     DozerComanche20mmCannonWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   DozerComancheAntiTankMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    DozerComancheRocketPodWeapon
    AutoChooseSources   = TERTIARY    FROM_SCRIPT
  End
  ArmorSet
    Conditions        = None
    Armor             = AFG_ComancheArmor
    DamageFX          = TankDamageFX
  End
  ArmorSet 
    Conditions        = PLAYER_UPGRADE
    Armor             = AFG_CountermeasuresComancheArmor
    DamageFX          = TankDamageFX
  End
  BuildCost           = 1500
  BuildTime           = 20              ; in seconds  
  ;Increased a little bit because we're more valuable in other ways
  ExperienceValue     = 60 60 120 250   ; Experience point value at each level
  ;Reduced by a little bit since we're not combat-heavy anymore
  ExperienceRequired  = 0 60 150 275   ; Experience points needed to gain each level
  IsTrainable         = Yes             ; Can gain experience
  CommandSet          = AirF_AmericaAirDozerCommandSetOne

  ; *** AUDIO Parameters ***
  VoiceSelect           = DozerUSAVoiceSelect
  VoiceMove             = DozerUSAVoiceMove
  VoiceGuard            = DozerUSAVoiceMove
  VoiceTaskComplete     = DozerUSAVoiceBuildComplete
  VoiceAttack           = DozerUSAVoiceAttack 
  VoiceAttackAir        = DozerUSAVoiceAttack 
  SoundAmbient          = ComancheAmbientLoop
  SoundAmbientRubble    = NoSound
  ;SoundMoveStart      = DozerUSAMoveStart
  ;SoundMoveStartDamaged = DozerUSAMoveStart
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = DozerUSAVoiceCreate
    VoiceNoBuild        = DozerUSAVoiceBuildNot
    VoiceCrush          = DozerUSAVoiceCrush
    VoiceRepair         = DozerUSAVoiceRepair
    VoiceDisarm         = DozerUSAVoiceClearMine
    SoundEject          = PilotSoundEject
    VoiceEject          = PilotVoiceEject
    Afterburner         = RaptorAfterburner
    VoiceGarrison       = DozerUSAVoiceMove
    TurretMoveStart     = NoSound
    TurretMoveLoop      = NoSound
    VoiceFireRocketPods = DozerUSAVoiceAttack 
    VoiceEnter          = DozerUSAVoiceMove
    VoiceBuildResponse  = DozerUSAVoiceBuild
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority   = UNIT
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT PRODUCED_AT_HELIPAD DOZER

  Behavior = WeaponSetUpgrade ModuleTag_02
    TriggeredBy = Upgrade_ComancheRocketPods
  End
  Behavior = ExperienceScalarUpgrade ModuleTag_03
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Body = ActiveBody ModuleTag_04
    MaxHealth       = 300.0
    InitialHealth   = 300.0
  End

  Behavior = FXListDie ModuleTag_05
    DeathFX = FX_ComancheStartDeath
  End

  Behavior = JetAIUpdate ModuleTag_06
    MinHeight                     = 5
    NeedsRunway                   = No
    KeepsParkingSpaceWhenAirborne = No
    AutoAcquireEnemiesWhenIdle    = Yes
    ; note that comanches do not return to base when idle
    
    ; this is a bit of a trick... normally, units cannot move-and-fire at
    ; the same time. we need the comanche to be able to. so we give it
    ; a "turret" (invisible) and put the two main weapons on it, but with
    ; no turn rate. voila!
    Turret
      TurretTurnRate = 0      ; this "turret" does not turn
      TurretPitchRate = 0     ; nor does it pitch
      ControlledWeaponSlots = PRIMARY SECONDARY
    End

  End
  Locomotor = SET_NORMAL  ComancheLocomotor
  Locomotor = SET_TAXIING BasicHelicopterTaxiLocomotor

  Behavior = PhysicsBehavior ModuleTag_07
    Mass = 50.0
  End
  Behavior = HelicopterSlowDeathBehavior ModuleTag_08
    DestructionDelay                = 99999999        ; the destruction delay
    SpiralOrbitTurnRate             = 140.0           ; in degrees per second, bigger # = tighter spiral
    SpiralOrbitForwardSpeed         = 350.0           ; bigger # = larger spiral
    SpiralOrbitForwardSpeedDamping  = .9999           ; smaller #'s = slow down faster
    MaxBraking                      = 190   ; max braking we can use during death spiral (lower num = wilder spiral)    
    SoundDeathLoop                  = ComancheDamagedLoop
    MinSelfSpin                     = 100                     ; in degrees per second
    MaxSelfSpin                     = 300                     ; in degrees per second
    SelfSpinUpdateDelay             = 100             ; in milliseconds
    SelfSpinUpdateAmount            = 10             ; in degrees   
    FallHowFast                     = 12.0%  ; fraction of gravity, lower = take longer to fall
    MinBladeFlyOffDelay             = 1500            ; in milliseconds
    MaxBladeFlyOffDelay             = 1500            ; in milliseconds
    AttachParticle                  = SootySmokeTrail
    AttachParticleBone              = Propeller02
    BladeObjectName                 = ComancheBlades
    BladeBoneName                   = Propeller01    
    ; Most things that eject pilots do so immediately upon death,
    ; via use of EjectPilotDie, but Helicopters are a special case...
    ; they need to do so after their blades are ejected. 
    OCLEjectPilot                   = OCL_EjectPilotViaParachute
    FXBlade                         = FX_HelicopterBladeExplosion
    OCLBlade                        = OCL_HelicopterBladeExplosion
    FXHitGround                     = FX_HelicopterHitGround
    OCLHitGround                    = OCL_HelicopterHitGround
    FXFinalBlowUp                   = FX_GroundedHelicopterBlowUp
    OCLFinalBlowUp                  = OCL_GroundedHelicopterBlowUp
    DelayFromGroundToFinalDeath     = 1500
    FinalRubbleObject               = ComancheRubbleHull
  End

  Behavior = TransitionDamageFX ModuleTag_09
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuousDown
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_ComancheDamageTransition
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 4000  ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  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

  ;Airgineers don't benefit from Stealth Comanche stuffs
  ;Behavior = StealthUpdate ModuleTag_22
  ;  StealthDelay                          = 2000 ; msec
  ;  StealthForbiddenConditions            = FIRING_PRIMARY ATTACKING USING_ABILITY
  ;  FriendlyOpacityMin                    = 50.0%
  ;  FriendlyOpacityMax                    = 100.0%
  ;  InnateStealth                         = No
  ;  OrderIdleEnemiesToAttackMeUponReveal  = Yes
  ;End

  ;Behavior = StealthUpgrade ModuleTag_23
  ;  TriggeredBy = AirF_Upgrade_StealthComanche
  ;End

  Behavior = DozerAIUpdate ModuleTag_22
    RepairHealthPercentPerSecond = 2%    ; % of max health to repair each second
    BoredTime                    = 5000  ; in milliseconds
    BoredRange                   = 150   ; when bored, we look this far away to do something
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    ;AutoAcquireEnemiesWhenIdle   = Yes
  End
  
  Behavior = AutoHealBehavior ModuleTag_23
    HealingAmount     = 5
    HealingDelay      = 1000 ; msec
    Radius            = 100.0f
    StartsActive      = Yes
    KindOf            = AIRCRAFT
    ForbiddenKindOf   = INFANTRY
    SkipSelfForHealing = Yes
  End
  
  Geometry = BOX
  GeometryMajorRadius = 20.0
  GeometryMinorRadius = 3.0
  GeometryHeight = 25.0     
  GeometryIsSmall = No
  Shadow = SHADOW_VOLUME    
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End


Code continued in post below   sshot044.bmp (6,076kb) downloaded 38 time(s).   sshot045.bmp (6,076kb) downloaded 17 time(s).
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Sponsor
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
7 years ago
Other code relating to this unit, I don't know if it's relevant to the issue or not:



- CommandSet.ini -

I realize there's no support code for the GLAWorker commandset switch. I'll add that when I get it otherwise building and attacking fine.

Also Comanches can attack air units in my mod, which explains the GuardFlyingUnitsOnly.

CommandSet AirF_AmericaAirDozerCommandSetOne
  1  = Command_AmericaVehicleComancheFireRocketPods
  2  = AirF_Command_ConstructAmericaPowerPlant
  3  = AirF_Command_ConstructAmericaStrategyCenter
  4  = AirF_Command_ConstructAmericaBarracks
  5  = AirF_Command_ConstructAmericaSupplyDropZone
  6  = AirF_Command_ConstructAmericaSupplyCenter
  7 = AirF_Command_ConstructAmericaWarFactory
  8 = AirF_Command_ConstructAmericaAirfield
    
  10 = Command_Stop
  11 = Command_AttackMove
  12 = Command_GuardFlyingUnitsOnly
  13 = Command_Guard
  14  = Command_UpgradeGLAWorkerFakeCommandSet
End


CommandSet AirF_AmericaAirDozerCommandSetTwo

  2  = AirF_Command_ConstructAmericaParticleCannonUplink
  3  = AirF_Command_ConstructAmericaPatriotBattery
  4  = AirF_Command_ConstructAmericaFireBase
  5  = AirF_Command_ConstructAmericaCommandCenter
  
  10 = Command_Stop
  11 = Command_AttackMove
  12 = Command_GuardFlyingUnitsOnly
  13 = Command_Guard
  14  = Command_UpgradeGLAWorkerRealCommandSet
End


- Weapon.ini -

;AIR DOZER aka AIRGINEER VERSIONS
;Deals half the damage of the Comanche
Weapon DozerComanche20mmCannonWeapon
  PrimaryDamage               = 3.0
  PrimaryDamageRadius         = 1.0       ; 0 primary radius means "hits only intended victim"
  AttackRange                 = 200.0      
  MinimumAttackRange          = 0.0 ;100.0       ; this is to allow for a little "lead" for the helicopter targeting
  DamageType                  = COMANCHE_VULCAN  ;used only for this weapon so stinger sites don't lose their guys but otherwise acts just like Small_Arms
  DeathType                   = NORMAL
  WeaponSpeed                 = 999999.0          ; dist/sec (huge value == effectively instant)
  ProjectileObject            = NONE
  FireSound                   = RedGuardWeapon
  FireFX                      = WeaponFX_Comanche20mmCannonFire
  VeterancyFireFX             = HEROIC WeaponFX_HeroicComanche20mmCannonFire
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots           = 100         ; time between shots, msec
  ClipSize                    = 0                    ; how many shots in a Clip (0 == infinite)
  ClipReloadTime              = 0              ; how long to reload a Clip, msec
  AntiAirborneVehicle         = Yes ;No
  AntiAirborneInfantry        = Yes
End

;------------------------------------------------------------------------------
Weapon DozerComancheAntiTankMissileWeapon
  PrimaryDamage               = 25            
  PrimaryDamageRadius         = 5.0      
  SecondaryDamage             = 30.0          
  SecondaryDamageRadius       = 25.0    
  ScatterRadiusVsInfantry     = 20.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 200.0
  MinimumAttackRange          = 0.0 ;100.0       ; this is to allow for a little "lead" for the helicopter targeting
  DamageType                  = JET_MISSILES  ;not so good against base defenses and some other units.  
  DeathType                   = EXPLODED
  WeaponSpeed                 = 99999
  ProjectileObject            = ComancheAntiTankMissile
  ProjectileExhaust           = MissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicComancheMissileExhaust
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots           = 500            ; time between shots, msec
  ClipSize                    = 4              ; how many shots in a Clip (0 == infinite)
  AutoReloadsClip             = Yes
  ClipReloadTime              = 15000                      ; how long to reload a Clip, msec
  AutoReloadWhenIdle          = 15100    ; If I haven't fired in this long, I will reload on my own (rather than only after the last one is fired)
  FireSound                   = StingerMissileWeapon
  FireFX                      = None
  ProjectileDetonationFX      = WeaponFX_ComancheAntiTankMissileDetonation
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle         = Yes ;No
  AntiAirborneInfantry        = No
  ShowsAmmoPips               = Yes
End

;------------------------------------------------------------------------------
Weapon DozerComancheRocketPodWeapon
  PrimaryDamage           = 15.0            
  PrimaryDamageRadius     = 5.0      
  SecondaryDamage         = 10.0          
  SecondaryDamageRadius   = 40.0   
  ScatterRadius           = 0;changed to zero, unless you want to soften the results of the table below

  ; @todo srj -- need better targets; these are copied from Scud Storm
  ; Instead of a purely random scatter distance, this will divide a clip evenly and randomly at these spots
  ; These specific points are an even distribution simulating a 150 ScatterRadius.
  ; With fewer entries than ClipSize, the extra will hit 0,0 as normal shots
  ; With extra entries, 9 of 12 could be used eg, and then you'd get a different nine next clip.

  ScatterTargetScalar = 50; replaces the ScatterRadius, above, for scaling this table, below
  ScatterTarget           = X: 0.000 Y: 0.133
  ScatterTarget           = X: 0.133 Y:-0.200
  ScatterTarget           = X:-0.067 Y: 0.667
  ScatterTarget           = X: 0.300 Y: 0.300
  ScatterTarget           = X: 0.767 Y: 0.000       
  ScatterTarget           = X: 0.500 Y:-0.567        
  ScatterTarget           = X:-0.333 Y:-0.800        
  ScatterTarget           = X:-0.600 Y:-0.1333        
  ScatterTarget           = X:-0.567 Y: 0.433        
  ScatterTarget           = X: 0.000 Y: 0.133
  ScatterTarget           = X: 0.133 Y:-0.200
  ScatterTarget           = X:-0.067 Y: 0.667
  ScatterTarget           = X: 0.300 Y: 0.300
  ScatterTarget           = X: 0.767 Y: 0.000       
  ScatterTarget           = X: 0.500 Y:-0.567        
  ScatterTarget           = X:-0.333 Y:-0.800        
  ScatterTarget           = X:-0.600 Y:-0.1333        
  ScatterTarget           = X:-0.567 Y: 0.433        
  ScatterTarget           = X: 0.000 Y: 0.133
  ScatterTarget           = X: 0.133 Y:-0.200

  ScatterRadiusVsInfantry = 0.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange             = 200.0
  MinimumAttackRange      = 0.0 ;100.0       ; this is to allow for a little "lead" for the helicopter targeting
  DamageType              = EXPLOSION
  DeathType               = EXPLODED
  ;WeaponSpeed             = 99999
  ProjectileObject        = ComancheRocketPodRocket
  ProjectileExhaust       = MissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicComancheMissileExhaust
  RadiusDamageAffects     = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots       = 200    ; time between shots, msec
  ClipSize                = 20              ; how many shots in a Clip (0 == infinite)
  AutoReloadsClip         = Yes
  ClipReloadTime          = 30000                      ; how long to reload a Clip, msec
  FireSound               = StingerMissileWeapon
  FireFX                  = None
  ProjectileDetonationFX  = WeaponFX_ComancheRocketPodRocketDetonation
  ProjectileCollidesWith  = STRUCTURES
  AntiAirborneVehicle     = No
  AntiAirborneInfantry    = No
  WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
End

;------------------------------------------------------------------------------


- Voice.ini -



;Placeholder for the Airgineer
;Crush sounds and mine clearing sounds
AudioEvent DozerUSAVoiceAttack 
  Sounds = vdoucla vdouclc vdoucld vdoucra vdoucrb vdoucrc
  Control = random
  Volume = 90
  Type = ui voice player
End



Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
AdrianeMapMaker
7 years ago
actually if i remember correctly shockwave already have this .. look onto its code in airf gen
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




SkyMix_RMT
7 years ago
Locomotor must be one of the last things to appear, put it before geometry and after everything else.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Annihilationzh
7 years ago
Problems:

1) You have two AIUpdates. DozerAIUpdate and JetAIUpdate. I can't remember what bugs that causes, but I do remember that it's bad.

2) You have your Locomotors before the DozerAIUpdate. Locomotors are linked to AI - they must always come afterwards in the code. This is why the unit won't move.

Locomotor must be one of the last things to appear, put it before geometry and after everything else.

Originally Posted by: SkyMix_RMT 


...? The base game code doesn't even follow that rule.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
7 years ago

Problems:
2) You have your Locomotors before the DozerAIUpdate. Locomotors are linked to AI - they must always come afterwards in the code. This is why the unit won't move.

Originally Posted by: Annihilationzh 



Thank you, moving the DozerAIUpdate to before the locomotor fixed the issue! 😁 Now I can continue work on the Dozer of the Skies!



1) You have two AIUpdates. DozerAIUpdate and JetAIUpdate. I can't remember what bugs that causes, but I do remember that it's bad.



Hmm... I didn't notice any issues in testing it. he seemed to acquire targets and repair structures just fine. Maybe it's only if you use two of the same AIUpdates?
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
7 years ago
New problem: After adding support code for GLA Worker CommandSet switching, the button no longer says "Conflicting Upgrade cannot be purchased" but is still grayed out and unusable.


Unit:

  BuildCost           = 1500
  BuildTime           = 20              ; in seconds  
  ;Increased a little bit because we're more valuable in other ways
  ExperienceValue     = 60 60 120 250   ; Experience point value at each level
  ;Reduced by a little bit since we're not combat-heavy anymore
  ExperienceRequired  = 0 60 150 275   ; Experience points needed to gain each level
  IsTrainable         = Yes             ; Can gain experience
  CommandSet          = AirF_AmericaAirDozerCommandSetForBuilding


....
  

  Behavior = CommandSetUpgrade ModuleTag_24
    TriggeredBy = Upgrade_GLAWorkerFakeCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerRealCommandSet
    CommandSet = AirF_AmericaAirDozerCommandSetForCombat
  End
 
  Behavior = CommandSetUpgrade ModuleTag_25
    TriggeredBy = Upgrade_GLAWorkerRealCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerFakeCommandSet Upgrade_GLAWorkerRealCommandSet
    CommandSet = AirF_AmericaAirDozerCommandSetForBuilding
  End


CommandSet.ini:



CommandSet AirF_AmericaAirDozerCommandSetForBuilding
  1  = AirF_Command_ConstructAmericaPowerPlant
  2  = AirF_Command_ConstructAmericaStrategyCenter
  3  = AirF_Command_ConstructAmericaBarracks
  4  = AirF_Command_ConstructAmericaSupplyDropZone
  5  = AirF_Command_ConstructAmericaSupplyCenter
  6  = AirF_Command_ConstructAmericaParticleCannonUplink
  7  = AirF_Command_ConstructAmericaPatriotBattery
  8  = AirF_Command_ConstructAmericaCommandCenter
  9  = AirF_Command_ConstructAmericaFireBase
  11 = AirF_Command_ConstructAmericaWarFactory
  13 = AirF_Command_ConstructAmericaAirfield
  14  = Command_UpgradeGLAWorkerFakeCommandSet
End


CommandSet AirF_AmericaAirDozerCommandSetForCombat
  1  = Command_AmericaVehicleComancheFireRocketPods
  10 = Command_Stop
  11 = Command_AttackMove
  12 = Command_GuardFlyingUnitsOnly
  13 = Command_Guard
  14  = Command_UpgradeGLAWorkerRealCommandSet
End

Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Annihilationzh
7 years ago

New problem: After adding support code for GLA Worker CommandSet switching, the button no longer says "Conflicting Upgrade cannot be purchased" but is still grayed out and unusable.

Originally Posted by: Gameanater 


I take it you're missing a ProductionUpdate?
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
7 years ago

New problem: After adding support code for GLA Worker CommandSet switching, the button no longer says "Conflicting Upgrade cannot be purchased" but is still grayed out and unusable.

Originally Posted by: Annihilationzh 


I take it you're missing a ProductionUpdate?

Originally Posted by: Gameanater 



Oh my goodness 😂 😂 I can't believe I missed that. Thank you, you're a life saver. XD

It works like a charm after adding the ProductionUpdate from the worker. Now I can focus on tweaking the CommandSets and adding effects for when the unit is building something.

Thank you!
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
SkyMix_RMT
7 years ago

Problems:

Locomotor must be one of the last things to appear, put it before geometry and after everything else.

Originally Posted by: Annihilationzh 


...? The base game code doesn't even follow that rule.

Originally Posted by: SkyMix_RMT 



You see, I knew that locomotor had to be placed after something which I had forgotten of (AIUpdate module tag), so I knew that if he placed locomotor in the end of the code it would 100% be after the ai update.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord