Private Joined: 5/17/2024(UTC) Posts: 3
|
Hi,
I am trying to make a anti air unit that shoots long range missiles. I am able to get the unit to point the turret straight up and don't turn to the target while firing. But I just can't get the missiles to come out of the tubes properly.
This is my code:
;------------------------------------------------------------------------------ Object Tank_ChinaVehicleGrumble
; *** ART Parameters *** SelectPortrait = SRGrumble_L ButtonImage = SRGrumble_L
Draw = W3DTruckDraw ModuleTag_01 OkToChangeModelColor = Yes
ProjectileBoneFeedbackEnabledSlots = PRIMARY SECONDARY ; WeaponLaunchBone will be shown/hidden, not just used for firing offset
DefaultConditionState Model = RVGrumble Turret = TURRET TurretPitch = TURRETEL ShowSubObject = TURRET Animation = RVGrumble.RVGrumble AnimationMode = ONCE_BACKWARDS Flags = START_FRAME_FIRST
WeaponFireFXBone = PRIMARY Muzzle WeaponMuzzleFlash = PRIMARY MuzzleFX WeaponLaunchBone = PRIMARY WeaponA End
ConditionState = REALLYDAMAGED Model = RVGrumble_D End AliasConditionState = RUBBLE
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 = Tire02 MidLeftFrontTireBone = Tire03 MidRightFrontTireBone = Tire04 MidLeftRearTireBone = Tire05 MidRightRearTireBone = Tire06 LeftRearTireBone = Tire07 RightRearTireBone = Tire08
TireRotationMultiplier = 0.2 ; this * speed = rotation. ;PowerslideRotationAddition = 0.0 ; This speed is added to the rotation speed when powersliding.
End
; ***DESIGN parameters ***
DisplayName = OBJECT:Grumble Side = China EditorSorting = VEHICLE TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet Conditions = None Weapon = PRIMARY S300GrumbleMissileWeapon AutoChooseSources = PRIMARY FROM_SCRIPT FROM_AI DEFAULT_SWITCH_WEAPON PreferredAgainst = PRIMARY BALLISTIC_MISSILE AIRCRAFT
End
ArmorSet Conditions = None Armor = TruckArmor DamageFX = TankDamageFX End BuildCost = 1900 BuildTime = 20.0 ;in seconds VisionRange = 600 ShroudClearingRange = 700 Prerequisites Object = Tank_ChinaPropagandaCenter Object = Tank_ChinaNuclearMissileLauncher End
ExperienceValue = 50 50 100 150 ;Experience point value at each level ExperienceRequired = 0 100 200 400 ;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 = Tank_ChinaVehicleBattleMasterCommandSet
; *** AUDIO Parameters *** VoiceSelect = GrumbleVoiceSelect VoiceMove = GrumbleVoiceMove VoiceGuard = GrumbleVoiceMove VoiceAttack = GrumbleVoiceAttack VoiceAttackAir = GrumbleVoiceAttack SoundMoveStart = ScudLauncherMoveStart SoundMoveStartDamaged = ScudLauncherMoveStart UnitSpecificSounds VoiceCreate = GrumbleVoiceCreate Deploy = GrumbleDeploy Undeploy = GrumbleUnDeploy VoiceEnter = GrumbleVoiceMove End
; *** ENGINEERING Parameters *** RadarPriority = UNIT KindOf = PRELOAD SELECTABLE CAN_ATTACK DONT_AUTO_CRUSH_INFANTRY CAN_CAST_REFLECTIONS VEHICLE
Body = ActiveBody ModuleTag_02 MaxHealth = 180.0 InitialHealth = 180.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 = 360 SubdualDamageHealRate = 500 SubdualDamageHealAmount = 50 End
Behavior = AIUpdateInterface ModuleTag_03 Turret TurretTurnRate = 200 TurretPitchRate = 120 FirePitch = 90 AllowsPitch = Yes NaturalTurretPitch = 0 ;GroundUnitPitch = -20 ;MinPhysicalPitch = -20 ;AllowsPitch = Yes ControlledWeaponSlots = PRIMARY MinIdleScanInterval = 100 MaxIdleScanInterval = 100 MinIdleScanAngle = 0 MaxIdleScanAngle = 360 End
AutoAcquireEnemiesWhenIdle = Yes End
Behavior = CommandButtonHuntUpdate ModuleTag_04 ; allows use of command button hunt script with this unit. End
Locomotor = SET_NORMAL ScudLauncherLocomotor Behavior = PhysicsBehavior ModuleTag_05 Mass = 40.0 End
Behavior = TransitionDamageFX ModuleTag_08 ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01 ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_ScudLauncherDamageTransition End
; Catch fire, and explode death Behavior = SlowDeathBehavior ModuleTag_09 DeathTypes = ALL -CRUSHED -SPLATTED ProbabilityModifier = 50 DestructionDelay = 2000 DestructionDelayVariance = 300 FX = INITIAL FX_CrusaderCatchFire OCL = FINAL OCL_SCUDLauncherDeathEffect FX = FINAL FX_ScudLauncherExplosionOneFinal End
; A crushing defeat Behavior = FXListDie ModuleTag_10 DeathTypes = NONE +CRUSHED +SPLATTED DeathFX = FX_CarCrush End
Behavior = CreateObjectDie ModuleTag_11 DeathTypes = NONE +CRUSHED +SPLATTED CreationList = OCL_CrusaderTank_CrushEffect 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
Behavior = DestroyDie ModuleTag_22 DeathTypes = NONE +CRUSHED +SPLATTED End
Behavior = LockWeaponCreate ModuleTag_24 SlotToLock = PRIMARY ; Prevents indeterminate state plus two unpickable weapons equaling no attack. End
Geometry = BOX GeometryMajorRadius = 14.0 GeometryMinorRadius = 7.0 GeometryHeight = 11.5 GeometryIsSmall = No Shadow = SHADOW_VOLUME ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
Could someone help? Thanks! Sorry I didn't know how to put the code in a neater format
|
|
|
|
General Joined: 3/8/2016(UTC) Posts: 1,160 Thanks: 312 times Was thanked: 185 time(s) in 149 post(s)
|
are you sure the muzzle bone exist and properly added ? |
|
|
|
|
Private Joined: 5/17/2024(UTC) Posts: 3
|
Good question.
I can see the muzzle flashes coming from the four tubes when firing, so they should be in the proper location. But the missiles does not appear from the tubes
Should I put weaponA instead of muzzle for weaponlaunchbone?
|
|
|
|
Users browsing this topic |
Guest
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.