logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,617
Total Threads: 8,723
Posts: 95,217

Administrators:
DeeZire, Redemption

There are currently 39 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > Command and Conquer Editing > Generals & Zero Hour Editing » SA-6 Gainful: weapon delay and turret pitch problem

Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 08-21-2003, 06:17 PM   #1 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default SA-6 Gainful: weapon delay and turret pitch problem

Hello!

I created a SA-6 Gainful AA missile system. The tank uses one weapon but has three weapon slots. This was necessary to make the missiles disappear after they are launched.

Now my first problem is:

The turret fire pitch of the tank is set to 30 degrees. When the tank is ordered to attack an aircraft, it raises its TURRETEL to 30 degrees and the missiles are launched. The problem is, the missiles rise more steeply to say 45 degrees when they are launched. This it looks unrealistic. I want that the missiles are fired at a pitch of 30 degree so that they simply start where the tanks TURRETEL is. Is there a way to make that possible?

My second problem is:

Since I have those three missiles waiting to be launched I want them to start delayed. That means Missile01 starts, 5 seconds pass Missile 02 starts and 5 seconds later Missile03 starts. Because now they are launched almost immediately and at the same time.

I am using an edited version of the TomahawkMissileLocomotor (=SA6GainfulMissileLocomotor), and TomahawkMissileWeapon (=SA6GainfulMissileWeapon) and AmericaVehicleTomahawk (=RussiaVehicleSA6Gainful, FactionUnit.ini) and the TomahawkMissile (=Sa6GainfulMissile, FactionUnit.ini) as you can see below:

Quote:
;------------------------------------------------------------------------------
Locomotor SA6GainfulMissileLocomotor
Surfaces = AIR
Speed = 600 ; in dist/sec
MinSpeed = 120 ; in dist/sec. (THRUST items must have nonzero minspeeds!)
Acceleration = 900 ; in dist/(sec^2)
Braking = 0 ; in dist/(sec^2)
TurnRate = 625 ; in degrees/sec
MaxThrustAngle = 60 ; in degrees (NOT degrees/sec)
AllowAirborneMotiveForce = Yes
Appearance = THRUST
PreferredHeight = 100 <- maybe?
AirborneTargetingHeight = 30
CloseEnoughDist3D = No ; This allows the missile to fly over the target and come back
End
Quote:
;------------------------------------------------------------------------------
Weapon SA6GainfulMissileWeapon
PrimaryDamage = 150.0
PrimaryDamageRadius = 10.0
;SecondaryDamage = 50.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 = 350.0
PreAttackDelay = 250 <- maybe?
PreAttackType = PER_SHOT <- maybe?
MinimumAttackRange = 100.0
DamageType = EXPLOSION
DeathType = EXPLODED
;WeaponSpeed = 1200
;ScaleWeaponSpeed = Yes
FireFX = FX_TomahawkIgnition
ProjectileObject = Sa6GainfulMissile
ProjectileExhaust = TomahawkMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicTomahawkMissileExhaust
;ProjectileDetonationFX = WeaponFX_TomahawkMissileDetonation
;ProjectileDetonationFX = WeaponFX_BombTruckDefaultBombDetonation
ProjectileDetonationFX = WeaponFX_StingerMissileDetonation
RadiusDamageAffects = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
FireSound = TomahawkWeapon
DelayBetweenShots = 4500
ClipSize = 1 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 4000 ; how long to reload a Clip, msec
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
AntiGround = Yes
RequestAssistRange = 200 ; when I fire, my object will look around for things of
;his type and tell their AssistedTargetingModules to fire a clip if they are free to do so.
;Uses a clip of one to get the Reloading modelcondition
CapableOfFollowingWaypoints = Yes

; note, these only apply to units that aren't the explicit target
; (ie, units that just happen to "get in the way"... projectiles
; always collide with the Designated Target, regardless of these flags
ProjectileCollidesWith = STRUCTURES
End
Quote:
;------------------------------------------------------------------------------
Object Sa6GainfulMissile

; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
ConditionState = NONE
Model = rusa6_M

End
End

; ***DESIGN parameters ***
DisplayName = OBJECT:Sa6GainfulMissile
EditorSorting = SYSTEM
VisionRange = 0.0
ArmorSet
Conditions = None
;*Be careful with this type, use in conjunction with KindOf = BALLISTIC_MISSILE to restrict targeting
;*to select weapons, because ballistic missile armor is weak! Weapons capable of targeting must have
;*AntiBallisticMissile = Yes set in the Weapon.ini.
Armor = BallisticMissileArmor
DamageFX = None
End

; *** ENGINEERING Parameters ***
KindOf = PROJECTILE BALLISTIC_MISSILE
Body = ActiveBody ModuleTag_02
MaxHealth = 200.0
InitialHealth = 100.0
End

; ---- begin Projectile death behaviors
Behavior = InstantDeathBehavior DeathModuleTag_01
DeathTypes = NONE +DETONATED
; we detonated normally.
FX = WeaponFX_TomahawkMissileDetonation
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_06
Mass = 1
End
Behavior = MissileAIUpdate ModuleTag_07
TryToFollowTarget = Yes
FuelLifetime = 10000
IgnitionDelay = 0
IgnitionFX = FX_TomahawkIgnition
InitialVelocity = 200 ; in dist/sec
DistanceToTravelBeforeTurning = 80
;DistanceToTravelBeforeTurning = 5
DistanceToTargetBeforeDiving = 150 ; When I hit this close to target, I ignore PreferredHeight.
; Note, if this is too small, the missile will turn too late to hit. And, since we have a 2D
; heart, being over the target counts as "there", so we'll give up and just go straight.

;DistanceToTargetForLock = 10 ; Short lock on, as it looks better flying. jba.
DistanceToTargetForLock = 100 ; If it gets within 100 of the target, it kills the target.

End
Locomotor = SET_NORMAL SA6GainfulMissileLocomotor

Geometry = Cylinder ; Since collision extents can't tilt, this is a little fake
GeometryMajorRadius = 8.0
GeometryHeight = 4.0
GeometryIsSmall = Yes

Shadow = SHADOW_DECAL
End
Quote:
;----------------------------------------------------------
Object RussiaVehicleSA6Gainful

; *** ART Parameters ***
SelectPortrait = SACTomahawk_L
ButtonImage = SACTomahawk

;UpgradeCameo1 = XXX
;UpgradeCameo2 = XXX
;UpgradeCameo3 = XXX
;UpgradeCameo4 = XXX
;UpgradeCameo5 = XXX

Draw = W3DTankDraw ModuleTag_01
OkToChangeModelColor = Yes

ProjectileBoneFeedbackEnabledSlots = PRIMARY SECONDARY TERTIARY; WeaponLaunchBone will be shown/hidden, not just used for firing offset

DefaultConditionState
Model = rusa6
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
WeaponHideShowBone = PRIMARY MISSILE01
WeaponLaunchBone = SECONDARY WeaponB
WeaponHideShowBone = SECONDARY MISSILE02
WeaponLaunchBone = TERTIARY WeaponC
WeaponHideShowBone = TERTIARY MISSILE03
End

ConditionState = REALLYDAMAGED
Model = AVTomahawk_D
End
AliasConditionState = RUBBLE

TrackMarks = EXTnkTrack.tga

End

; ***DESIGN parameters ***
DisplayName = OBJECT:SA6Gainful
Side = Russia
EditorSorting = VEHICLE
TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
BuildCost = 1200
;BuildTime = 20.0 ;in seconds
BuildTime = 1.0 ;in seconds
VisionRange = 200
ShroudClearingRange = 200
Prerequisites
Object = RussiaWarFactory
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 SA6GainfulMissileWeapon
Weapon = SECONDARY SA6GainfulMissileWeapon
Weapon = TERTIARY SA6GainfulMissileWeapon
End
ArmorSet
Conditions = None
Armor = AntiAirVehicle
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 = RussiaVehicleSA6GainfulCommandSet

; *** AUDIO Parameters ***
VoiceSelect = TomahawkVoiceSelect
VoiceMove = TomahawkVoiceMove
VoiceGuard = TomahawkVoiceMove
VoiceAttack = TomahawkVoiceAttack
SoundMoveStart = TomahawkMoveStart
SoundMoveStartDamaged = TomahawkMoveStart

UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = TomahawkVoiceCreate
TurretMoveStart = NoSound
TurretMoveLoop = TurretMoveLoopLoud
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
VoiceCrush = TomahawkVoiceCrush
VoiceEnter = TomahawkVoiceMove
VoiceBombard = TomahawkVoiceAttack
End

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

Body = ActiveBody ModuleTag_02
MaxHealth = 180.0
InitialHealth = 180.0
End

Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 70 ; turn rate, in degrees per sec
TurretPitchRate = 70
FirePitch = 30 ; Instead of aiming pitchwise at the target, it will aim here
AllowsPitch = Yes
FiresWhileTurning = Yes
;NaturalTurretPitch = 30 ; this keeps it aimed half way between land and sky
; since you never know from whence cometh danger
ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
;TurretFireAngleSweep = PRIMARY 8
;TurretFireAngleSweep = SECONDARY 60
;TurretSweepSpeedModifier = PRIMARY 0.5 ; Sweep slower than you turn
;TurretSweepSpeedModifier = SECONDARY 2.0 ; Sweep faster than you turn
;RecenterTime = 5000 ; how long to wait during idle before recentering
;NaturalTurretAngle = 0
;NaturalTurretPitch = 45 ; this keeps it aimed half way between land and sky
;MinIdleScanAngle = 30 ; in degrees off the natural turret angle
;MaxIdleScanAngle = 60 ; in degrees off the natural turret angle
;MinIdleScanInterval = 5000 ; in milliseconds
;MaxIdleScanInterval = 10000 ; in milliseconds
;InitiallyDisabled = Yes
;GroundUnitPitch = 40
End <- the whole turret part?

End
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL TomahawkLocomotor

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

Behavior = ObjectCreationUpgrade ModuleTag_06
UpgradeObject = OCL_AmericanBattleDrone
TriggeredBy = Upgrade_AmericaBattleDrone
ConflictsWith = Upgrade_AmericaScoutDrone
End
Behavior = ObjectCreationUpgrade ModuleTag_07
UpgradeObject = OCL_AmericanScoutDrone
TriggeredBy = Upgrade_AmericaScoutDrone
ConflictsWith = Upgrade_AmericaBattleDrone
End
Behavior = ProductionUpdate ModuleTag_08
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End

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

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

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

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

; Behavior = FXListDie
; DeathTypes = ALL -CRUSHED -SPLATTED
; DeathFX = FX_GenericTankDeathEffect
; End
; Behavior = CreateObjectDie
; DeathTypes = ALL -CRUSHED -SPLATTED
; CreationList = OCL_GenericTankDeathEffect
; End
Behavior = EjectPilotDie ModuleTag_13
DeathTypes = ALL -CRUSHED -SPLATTED
ExemptStatus = HIJACKED
VeterancyLevels = ALL -REGULAR ;only vet+ gives pilot
GroundCreationList = OCL_EjectPilotOnGround
AirCreationList = OCL_EjectPilotViaParachute
End

Behavior = TransitionDamageFX ModuleTag_14
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
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 = 15.0
GeometryMinorRadius = 10.0
GeometryHeight = 10.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length

End
I tried to delay the missile myself by editing the weapon.ini and adding PreAttackDelay = 250 and PreAttackType = PER_SHOT to the code but it seems that only the PRIMARY WEAPON is affected. Maybe there is another way to accomplish this.

I enabled the tank to fire at ground targets to for testing purposes and actually when firing at the ground the missiles start correctly when the turret is set to 30 degrees.

Thanks for any help, and sorry for that bunch of source code ;-)

- HEXman
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-23-2003, 11:12 PM   #2 (permalink)
Senior Member
 
Join Date: Aug 2003
Posts: 337
Default

BUMP for you
The_Blind_One is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-24-2003, 07:20 AM   #3 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 1,031
Send a message via ICQ to Phoib Send a message via MSN to Phoib
Default Re: SA-6 Gainful: weapon delay and turret pitch problem

Quote:
Originally Posted by 2312222
Quote:
;------------------------------------------------------------------------------
Locomotor SA6GainfulMissileLocomotor
PreferredHeight = 100 <- maybe? This will set the height they are travelling at.
Quote:
;------------------------------------------------------------------------------PreAttackDelay = 250 <- maybe?This will delay the launch of the missile for 250 msecs. In order for your idea to work, you will have to use 3 weapons with values like 250, 500 and 750.
PreAttackType = PER_SHOT <- maybe? The delay is every shot.
Quote:
;------------------------------------------------------------------------------
Object Sa6GainfulMissile
Behavior = MissileAIUpdate ModuleTag_07
TryToFollowTarget = Yes
FuelLifetime = 10000
IgnitionDelay = 0
IgnitionFX = FX_TomahawkIgnition
InitialVelocity = 200 ; in dist/sec
DistanceToTravelBeforeTurning = 80 [b]This is the tag you need to prevent the missile changing it's angle directly.
;DistanceToTravelBeforeTurning = 5
DistanceToTargetBeforeDiving = 150 ; When I hit this close to target, I ignore PreferredHeight.
; Note, if this is too small, the missile will turn too late to hit. And, since we have a 2D
; heart, being over the target counts as "there", so we'll give up and just go straight.
End
[
That should answer all questions. Might I ask why you need a SA-6?
Phoib is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-26-2003, 06:57 AM   #4 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

Well, I am creating a new side. That is russia. I want them to have a powerfull AA because they won't have comparable base defenses to the gatling tower or the patriot system since I want to give them red alert styled flame towers.
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra weapon set upgrades; multiple turret upgrade Accele Generals & Zero Hour Editing 4 09-20-2005 03:46 PM
Turret pitch when firing EvilViking Generals & Zero Hour Editing 6 05-20-2004 04:55 PM
How Can I fix this Turret Problem/ Oldfaq Generals & Zero Hour Editing 5 04-22-2003 01:46 PM
Turret allignment problem... Kuja Generals & Zero Hour Editing 3 04-21-2003 04:17 AM
Turret problem swither Generals & Zero Hour Editing 5 02-19-2003 08:14 PM


All times are GMT -4. The time now is 01:50 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.