Valentine
  • Valentine
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Hello.
I have a unit that looks to the enemy before he fired.
What is to do that the vehicle stands without moving if he fired?
Sponsor
Gameanater
8 years ago
Are you talking about how some units like the Quad Cannona and Humvee "look" at a unit with their turrets before they're in range?

If you want to disable that I think the only thing to do with go the route of the Marauder Tank and have no turret at all, which already nerfs the units a big amount. I think the turret is somewhere in the art code for a unit.
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Valentine
  • Valentine
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Exactly what i mean yes! Better to understand with screenshots:

Unit is ready to fire...
UserPostedImage
...but he turns before.
UserPostedImage


I removed all with "turret" in the vehicle ini, but same problem.
SkyMix_RMT
8 years ago
So you want the vehicle to fire the missile without turning?

This could be fixed by adding a super fast invisible turret that controls the weapon targeting.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
acidbrain
8 years ago
@Valentine
Can you post the KindOf list from the unit?
Panem et kirkinses
Valentine
  • Valentine
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
@SkyMix okay, but I don't know to add this sry :(

@acidbrain did you mean this?

; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK DONT_AUTO_CRUSH_INFANTRY CAN_CAST_REFLECTIONS VEHICLE SALVAGER WEAPON_SALVAGER SCORE
acidbrain
8 years ago


@acidbrain did you mean this?

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

Originally Posted by: Valentine 



Yip, was curious if you had ATTACK_NEEDS_LINE_OF_SIGHT in it.
Maybe you can add 'FiresWhileTurning = Yes' to the AIUpdate interface, dont know if it works but in theory the unit should fire instantly when it starts turning.

Greetz


Panem et kirkinses
SkyMix_RMT
8 years ago
@Valentine
Send me the unit's code I'll see what I can do.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Valentine
  • Valentine
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
@acidbrain
I added the line, but not working. > Error <
Maybe because the "DeployStyleAIUpdate" module in the code.

Unit code:

;------------------------------------------------------------------------------
Object AmericaVehicleTHAAD

  ; *** ART Parameters ***
  SelectPortrait         = SAThunderBolt_L
  ButtonImage            = SAThunderBolt
  
  UpgradeCameo1 = Upgrade_AmericaCompositeArmor
  
  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes


    DefaultConditionState
      Model           = AVTHAAD
      Animation       = AVTHAAD.AVTHAAD 
      AnimationMode                   = ONCE_BACKWARDS
      Turret                          = TURRET
      Flags                           = START_FRAME_FIRST
      WeaponLaunchBone                = SECONDARY WEAPONA
      WeaponFireFXBone                = SECONDARY WEAPONA
    End
      
    ConditionState                    = RUBBLE
      Model           = AVTHAAD_D
      Animation       = AVTHAAD_D.AVTHAAD_D 
      AnimationMode                   = ONCE_BACKWARDS
      Turret                          = TURRET
      Flags                           = START_FRAME_FIRST
      WeaponLaunchBone                = SECONDARY WEAPONA
      WeaponFireFXBone                = SECONDARY WEAPONA
    End

    ;*** PACKED STATE -- ready to move ***
    ConditionState    = MOVING
      Animation       = AVTHAAD.AVTHAAD 
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_FIRST
    End

    ConditionState    = REALLYDAMAGED MOVING
      Model           = AVTHAAD_D
      Animation       = AVTHAAD_D.AVTHAAD_D 
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_FIRST
    End
     
    ;*** UNPACKING STATE  -- preparing to fire ***
    ConditionState    = UNPACKING
      Animation       = AVTHAAD.AVTHAAD
      AnimationMode   = ONCE
    End

    ConditionState    = REALLYDAMAGED UNPACKING
      Model           = AVTHAAD_D
      Animation       = AVTHAAD_D.AVTHAAD_D 
      AnimationMode   = ONCE
    End

    ;*** PACKING STATE -- preparing to move ***
    ConditionState    = PACKING
      Animation       = AVTHAAD.AVTHAAD
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End

    ConditionState    = REALLYDAMAGED PACKING
      Model           = AVTHAAD_D
      Animation       = AVTHAAD_D.AVTHAAD_D 
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End

    ;*** DEPLOYED STATE -- ready to fire ***
    ConditionState  = DEPLOYED
      Model           = AVTHAAD
      Animation       = AVTHAAD.AVTHAAD
      AnimationMode   = ONCE
      Flags           = START_FRAME_LAST
    End

    ConditionState  = DEPLOYED REALLYDAMAGED
      Model           = AVTHAAD_D
      Animation       = AVTHAAD_D.AVTHAAD_D 
      AnimationMode   = ONCE
      Flags           = START_FRAME_LAST
    End

    TrackMarks = EXTireTrack.tga

    Dust = ScudLauncherDust
    DirtSpray = RocketBuggyDirtSpray
    PowerslideSpray = RocketBuggyDirtPowerSlide

    ; These parameters are only used if the model has a separate suspension,
    ; and the locomotor has HasSuspension = Yes.
    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire03
    LeftRearTireBone = Tire06
    RightRearTireBone = Tire08
    MidLeftFrontTireBone = Tire02
    MidRightFrontTireBone = Tire04
    MidLeftRearTireBone = Tire05
    MidRightRearTireBone = Tire07

    TireRotationMultiplier = 0.2   ; this * speed = rotation.
    ;PowerslideRotationAddition = 0.0   ; This speed is added to the rotation speed when powersliding.

  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:THAAD
  Side                   = America
  EditorSorting          = VEHICLE
  TransportSlotCount     = 6
  WeaponSet
    Conditions        = None
    Weapon            = SECONDARY ThaadMissileWeapon
  End
  ArmorSet
    Conditions           = None
    Armor                = TankArmor
    DamageFX             = TankDamageFX
  End
  ;ArmorSet
  ;  Conditions           = PLAYER_UPGRADE
  ;  Armor                = UpgradedTankArmor
  ;  DamageFX             = TankDamageFX
  ;End
  BuildCost              = 2000
  BuildTime              = 34.0          ;in seconds    
  VisionRange            = 250
  ShroudClearingRange = 400
  Prerequisites
    Object = AmericaWarFactory
    Object = AmericaStrategyCenter
  End
  ExperienceValue        = 100 100 200 400 ;Experience point value at each level
  ExperienceRequired     = 0 200 800 1600 ;Experience points needed to gain each level
  IsTrainable            = Yes  ;Can gain experience
  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             = AmericaVehicleTHAADCommandSet
  
  ; *** AUDIO Parameters ***
  VoiceSelect           = CrusaderTankVoiceSelect
  VoiceMove             = CrusaderTankVoiceMove
  VoiceGuard            = CrusaderTankVoiceMove
  VoiceAttack           = CrusaderTankVoiceAttack
  SoundMoveStart        = CrusaderTankMoveStart
  SoundMoveStartDamaged = CrusaderTankMoveStart
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = CrusaderTankVoiceCreate
    VoiceEnter             = CrusaderTankVoiceMove
    TurretMoveStart     = NoSound
    TurretMoveLoop      = TurretMoveLoop
    SoundEject          = PilotSoundEject
    VoiceEject          = PilotVoiceEject
    VoiceCrush          = CrusaderTankVoiceCrush
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK DONT_AUTO_CRUSH_INFANTRY CAN_CAST_REFLECTIONS VEHICLE SALVAGER WEAPON_SALVAGER SCORE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 350.0
    InitialHealth   = 350.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.
    SubdualDamageCap = 480
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

   Behavior = DeployStyleAIUpdate ModuleTag_03
    AutoAcquireEnemiesWhenIdle      = Yes
    PackTime                        = 3333
    UnpackTime                      = 3333
    TurretsFunctionOnlyWhenDeployed = Yes
    TurretsMustCenterBeforePacking  = Yes
    ManualDeployAnimations          = Yes
    AutoAcquireEnemiesWhenIdle      = Yes
    MoodAttackCheckRate             = 1
  End

  Locomotor            = SET_NORMAL ScudLauncherLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass                 = 50.0
  End

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

  Behavior = ExperienceScalarUpgrade ModuleTag_08
    TriggeredBy   = Upgrade_AmericaAdvancedTraining
    AddXPScalar   = 1.0 ;Increases experience gained by an additional 100%
  End
  Behavior = MaxHealthUpgrade ModuleTag_09
    TriggeredBy   = Upgrade_AmericaCompositeArmor
    AddMaxHealth  = 50.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  ; Turret fly off death
  Behavior = SlowDeathBehavior ModuleTag_10
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier  = 50
    DestructionDelay  = 500
    DestructionDelayVariance  = 100
    FX  = INITIAL  FX_GenericTankDeathEffect
    FX  = FINAL    FX_GenericTankDeathExplosion
    OCL = FINAL    OCL_CrusaderTank_CrushEffect
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_11
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier  = 50
    DestructionDelay  = 2000
    DestructionDelayVariance  = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    OCL = FINAL    OCL_CrusaderTank_CrushEffect 
    FX  = FINAL    FX_GenericTankDeathExplosion
  End

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

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

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_14
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

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

  Behavior                    = CreateCrateDie ModuleTag_CratesChange
   CrateData             = SalvageCrateData
   ;CrateData             = EliteTankCrateData
   ;CrateData             = HeroicTankCrateData
  End

  Behavior = EjectPilotDie ModuleTag_17
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    ExemptStatus = HIJACKED
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  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               = BOX
  GeometryMajorRadius    = 24.0
  GeometryMinorRadius    = 12.0
  GeometryHeight         = 10.0     
  GeometryIsSmall        = Yes    
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length
  Scale = 1.06
End
SkyMix_RMT
8 years ago
@Valentine
Change your moduletag_03 to:

 Behavior = DeployStyleAIUpdate ModuleTag_03
  AutoAcquireEnemiesWhenIdle = Yes
  PackTime = 3333
  UnpackTime = 3333
  Turret
    TurretTurnRate = 360
    FiresWhileTurning = Yes
    ControlledWeaponSlots = SECONDARY
  End
  TurretsFunctionOnlyWhenDeployed = Yes
  TurretsMustCenterBeforePacking = Yes
  ManualDeployAnimations = Yes
  MoodAttackCheckRate = 100
End

Let me know the results. Good luck.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Valentine
  • Valentine
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
@SkyMix not working 😞 but looks funny ^^

UserPostedImage
SkyMix_RMT
8 years ago
Easy fix. Remove the lines "Turret = TURRET" from all the condition states.

Let me know if it works. Good luck.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Valentine
  • Valentine
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
FINALLY! It works now!! =)

Big BIG THANK YOU SkyMix and all other for help!

See here:

UserPostedImage
SkyMix_RMT
8 years ago
Anytime man, I'm glad it helped!
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord