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

Forum Info
Forum Members: 18,613
Total Threads: 8,704
Posts: 94,969

Administrators:
DeeZire, Redemption

There are currently 50 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


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

Reply
 
LinkBack Thread Tools
Old 09-04-2004, 08:24 PM   #1 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 338
Default Dual Role Raptors

I'm trying to get the raptors to become fighter-bombers so that when a tank or infantry enters its guard range,it will only use its bombs but when enemy aircraft are detected, it will use its missiles.

Now when i put it in guard mode it just fires its missiles at ground targets it won't use its bombs.

I also want them to have a wider guard range.

I didn't post the art code because its just the basic raptor.
The RED is what i changed and the GREEN is the new code

; ***DESIGN parameters ***
DisplayName = OBJECT:Raptor
EditorSorting = VEHICLE
Side = America
TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable)
VisionRange = 600.0
ShroudClearingRange = 400
Prerequisites
Object = AmericaAirfield
End

WeaponSet
Conditions = None
Weapon = PRIMARY RaptorJetMissileWeapon
End

WeaponSet
Conditions = None
Weapon = Secondary RaptorAerialGuidedBombWeapon
End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY RaptorJetLaserGuidedMissileWeapon
End
ArmorSet
Conditions = None
Armor = AirplaneArmor
DamageFX = None
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = CountermeasuresAirplaneArmor
DamageFX = None
End


BuildCost = 1400
BuildTime = 20
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 = 1 ;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 = AmericaJetRaptorCommandSet

; *** AUDIO Parameters ***
VoiceSelect = RaptorVoiceSelect
VoiceMove = RaptorVoiceMove
VoiceAttack = RaptorVoiceAttack
VoiceAttackAir = RaptorVoiceAttackAir
VoiceGuard = RaptorVoiceAirPatrol
SoundAmbient = RaptorAmbientLoop
SoundAmbientRubble = NoSound
; SoundMoveLoop = RaptorAmbientLoop ; don't want sound while sitting at airfield
; SoundAmbient = NoSound
UnitSpecificSounds
VoiceCreate = RaptorVoiceCreate
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
Afterburner = RaptorAfterburner
VoiceLowFuel = RaptorVoiceLowFuel
VoiceGarrison = RaptorVoiceMove
End

; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
Body = ActiveBody ModuleTag_02
MaxHealth = 160.0
InitialHealth = 160.0
End

Behavior = WeaponSetUpgrade ModuleTag_03
TriggeredBy = Upgrade_AmericaLaserMissiles
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 = 3 ; Number of flares launched per volley (requires bones)
VolleyArcAngle = 90.0 ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
VolleyVelocityFactor = 1.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 = 0 ; 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 = ExperienceScalarUpgrade ModuleTag_04
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
End

Behavior = JetSlowDeathBehavior ModuleTag_05
FXOnGroundDeath = FX_JetOnGroundDeath
OCLOnGroundDeath = OCL_RaptorDeathFinalBlowUp
DestructionDelay = 99999999; destruction will happen when we
RollRate = 0.2
RollRateDelta = 100% ;each frame, rollrate = rollrate * rollrateDelta
PitchRate = 0.0
FallHowFast = 110.0% ;Bigger is faster (can be over 100%,it's a fraction of gravity)
FXInitialDeath = FX_RaptorDeathInitial
OCLInitialDeath = OCL_RaptorDeathInitial
DelaySecondaryFromInitialDeath = 500 ; in milliseconds
FXSecondary = FX_JetDeathSecondary
OCLSecondary = OCL_RaptorDeathSecondary
FXHitGround = FX_JetDeathHitGround
OCLHitGround = OCL_RaptorDeathHitGround
DelayFinalBlowUpFromHitGround = 200 ; in milliseconds
FXFinalBlowUp = FX_JetDeathFinalBlowUp
OCLFinalBlowUp = OCL_RaptorDeathFinalBlowUp
; DeathLoopSound = MICAL NEEDS TO MAKE ME
End
Behavior = EjectPilotDie ModuleTag_06
ExemptStatus = HIJACKED
GroundCreationList = OCL_EjectPilotOnGround
AirCreationList = OCL_EjectPilotViaParachute
VeterancyLevels = ALL -REGULAR ;only vet+ gives pilot
End

Behavior = PhysicsBehavior ModuleTag_07
Mass = 500.0
End

Behavior = TransitionDamageFX ModuleTag_08
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
End

Behavior = JetAIUpdate ModuleTag_09
OutOfAmmoDamagePerSecond = 10% ; amount of damage to take per SEC (not per frame) when out of ammo
; note that it's expressed as a percent of max health, not an absolute
TakeoffDistForMaxLift = 0% ; larger numbers give more lift sooner when taking off
TakeoffPause = 500
MinHeight = 5
ParkingOffset = 3 ; scooch it a little forward so the tail doesn't hit the doors
ReturnToBaseIdleTime = 10000 ; if idle for this long, return to base, even if not out of ammo
End
Locomotor = SET_NORMAL RaptorJetLocomotor
Locomotor = SET_TAXIING BasicJetTaxiLocomotor

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
GeometryIsSmall = Yes
GeometryMajorRadius = 14.0
GeometryMinorRadius = 7.0
GeometryHeight = 5.0
Shadow = SHADOW_VOLUME
ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length.

End

WEAPONS.INI

Weapon RaptorAerialGuidedBombWeapon
;PrimaryDamage = 150.0
;PrimaryDamageRadius = 40.0
PrimaryDamage = 2.0
PrimaryDamageRadius = 4.0
AttackRange = 300.0 ; this needs to be pretty high, since the Aurora moves so fast
AcceptableAimDelta = 45 ; we don't really need to be aimed directly at the target.
DamageType = AURORA_BOMB
DeathType = EXPLODED
WeaponSpeed = 99999
ProjectileObject = RaptorAerialGuidedBomb
; FireFX = FX_AuroraBombLaunch
; ProjectileDetonationFX = FX_AuroraBombDetonate
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
ClipSize = 2 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 5000 ; how long to reload a Clip, msec
AutoReloadsClip = RETURN_TO_BASE ; must return to base to reload this weapon
ShowsAmmoPips = 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



WEAPONOBJECTS.INI

RaptorAerialGuidedBomb

; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
DefaultConditionState
Model = EXCarptBmb
End
End

; ***DESIGN parameters ***
Side = America
EditorSorting = SYSTEM
ArmorSet
Conditions = None
Armor = ProjectileArmor
DamageFX = None
End
VisionRange = 0.0

; *** AUDIO Parameters ***

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

Behavior = PhysicsBehavior ModuleTag_03
Mass = 75.0
AerodynamicFriction = 2 ; this is now friction-per-sec
ForwardFriction = 2 ; this is now friction-per-sec
CenterOfMassOffset = 2 ; Default of 0 means nothing tips as it falls. Positive tips forward, negative tips back
End

; it may seem odd to have a "bomb" with a Locomotor, especially a Thrust locomotor,
; but there's a good reason: the Aurora moves so freakin' fast that it's really
; hard to (1) find a reliable drop location, and (2) actually get it close enough to
; that location. So we cheat: just get fairly close, then let the "bomb" do a little (subtle)
; navigation on the way down. This works pretty well and actually looks much better
; than you might think. (srj)
Behavior = MissileAIUpdate ModuleTag_04
TryToFollowTarget = No
FuelLifetime = 0
IgnitionDelay = 0
InitialVelocity = 0 ; in dist/sec
DistanceToTravelBeforeTurning = 0
DistanceToTargetBeforeDiving = 0
End
Locomotor = SET_NORMAL AuroraBombLocomotor ; yes, that's right.

Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 2.0

End
adamstrange is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-04-2004, 08:39 PM   #2 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

Code:
  WeaponSet
    Conditions          = NONE
    ; -----
    Weapon              = PRIMARY     RaptorJetMissileWeapon
    PreferredAgainst    = PRIMARY     AIRCRAFT
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   VulcanCannon
    PreferredAgainst    = SECONDARY   AIRCRAFT
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    JDAM
    PreferredAgainst    = TERTIARY    Vehicle Structure
    AutoChooseSources   = TERTIARY    FROM_PLAYER FROM_SCRIPT FROM_AI
  End
  WeaponSet
    Conditions            = PLAYER_UPGRADE 
    Weapon                = PRIMARY   RaptorJetLaserGuidedMissileWeapon
    PreferredAgainst    = PRIMARY     AIRCRAFT
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   VulcanCannon
    PreferredAgainst    = SECONDARY   AIRCRAFT
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    JDAM
    PreferredAgainst    = TERTIARY    Vehicle Structure
    AutoChooseSources   = TERTIARY    FROM_PLAYER FROM_SCRIPT FROM_AI
  End
code from my raptor... only prob is when you force fire on the ground it fires missiles :tard: I think if you change the bomb to primary it will work fine though...
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2004, 12:54 AM   #3 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 338
Default

I changed the PRIMARY but it fires the bombs and the missiles at ground targets.

WeaponSet
Conditions = NONE
; -----
Weapon = PRIMARY RaptorAerialGuidedBombWeapon
PreferredAgainst = PRIMARY Vehicle Structure
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = SECONDARY RaptorJetMissileWeapon
PreferredAgainst = SECONDARY AIRCRAFT
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI

End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY RaptorAerialGuidedBombWeapon
PreferredAgainst = PRIMARY Vehicle Structure
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----


Weapon = SECONDARY RaptorJetMissileWeapon
PreferredAgainst = SECONDARY AIRCRAFT
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI

End

What did you do for the weapons and weaponsobjects ?

Do your raptors fire 3 differnet weapons at 3 different targets?

I tried different combinations but it does not work.
adamstrange is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2004, 01:58 AM   #4 (permalink)
Member
 
Join Date: Aug 2004
Posts: 37
Default

Add this to the missle weapon stuff (In weapon.ini)
Code:
  AntiAirborneVehicle   = Yes
  AntiAirborneInfantry  = No
  AntiGround = No
It'll then be unable to attack ground units.
NVShacker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2004, 04:18 PM   #5 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

oh, hehe, forgot about that... it only half works though... dunno why, but you have to have a preffered against too...
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2004, 04:50 PM   #6 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: UK
Posts: 676
Send a message via MSN to DJRowley
Default

Silent_killa: You have two 'PreferredAgainst = Aircraft' weapons. That will cause slight weirdness (I forget exactly what though...)
DJRowley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2004, 05:36 PM   #7 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

works fine... missiles go first, guns go second... maybe that's why they fire missiles when I force fire though... this code was written when I first started modding, and I've never had a reason to change it... I'll look into it though...
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-05-2004, 08:28 PM   #8 (permalink)
Senior Member
 
Join Date: Feb 2004
Location: Glued to the chair in front of my laptop
Posts: 1,158
Default

Can't you just give it 2 weapons, one to use for Ground, one for Aircraft? Just put its Preffered = at ground yes for the bombs, then for air, put the missiles or whatever.
GametagAeonFlux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-06-2004, 01:23 AM   #9 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 338
Default

Current code change:

WeaponSet
Conditions = NONE
; -----
Weapon = PRIMARY RaptorJetMissileWeapon
PreferredAgainst = PRIMARY AIRCRAFT
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = SECONDARY RaptorAerialGuidedBombWeapon
PreferredAgainst = SECONDARY Vehicle Structure
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
End

WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY RaptorJetLaserGuidedMissileWeapon
PreferredAgainst = PRIMARY AIRCRAFT
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = SECONDARY RaptorAerialGuidedBombWeapon
PreferredAgainst = SECONDARY Vehicle Structure
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
End

ArmorSet
Conditions = None
Armor = AirplaneArmor
DamageFX = None
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = CountermeasuresAirplaneArmor
DamageFX = None
End


Weapons:

Weapon RaptorJetLaserGuidedMissileWeapon
PrimaryDamage = 125.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 540 ;600.0
MinimumAttackRange = 100.0
AcceptableAimDelta = 30
DamageType = JET_MISSILES
DeathType = EXPLODED
WeaponSpeed = 1000
ProjectileObject = RaptorJetMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust
FireFX = None
FireSound = RaptorJetMissileWeapon
ProjectileDetonationFX = WeaponFX_JetMissileDetonation
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
DelayBetweenShots = 150
ClipSize = 4
ClipReloadTime = 8000
AutoReloadsClip = RETURN_TO_BASE
ProjectileCollidesWith = STRUCTURES
AntiAirborneVehicle = Yes
AntiAirborneInfantry = No
AntiGround = No

ShowsAmmoPips = Yes
End


;------------------------------------------------------------------------------
Weapon RaptorAerialGuidedBombWeapon
;PrimaryDamage = 250.0
;PrimaryDamageRadius = 40.0
AttackRange = 300.0 ; this needs to be pretty high, since the Aurora moves so fast
AcceptableAimDelta = 45 ; we don't really need to be aimed directly at the target.
DamageType = AURORA_BOMB
DeathType = EXPLODED
WeaponSpeed = 99999
ProjectileObject = RaptorAerialGuidedBomb
; FireFX = FX_AuroraBombLaunch
; ProjectileDetonationFX = FX_AuroraBombDetonate
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR

AntiGround = Yes

ClipSize = 2 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 5000 ; how long to reload a Clip, msec
AutoReloadsClip = RETURN_TO_BASE ; must return to base to reload this weapon
ShowsAmmoPips = Yes

Code does not work,planes won't fly to the target when selected,they just take off and fly around the airfield

What is "TERTIARY" ?
adamstrange is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-06-2004, 01:23 AM   #10 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

well, tested it out and it works slightly better... basically when you have two weapons with PrefferedAgainst = Aircraft it will fire the missiles first, and the vulcan cannon second... I like it better when it fires both though, so thanx DJ
Silent_Killa 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
Dual W3D Objects goblinsleez Generals & Zero Hour Editing 2 03-16-2005 12:10 AM
Dual turret GLA tank? adamstrange Generals & Zero Hour Editing 4 07-16-2004 12:32 PM
Laser Gen's raptors. AgmLauncher Generals & Zero Hour Editing 5 06-09-2004 06:40 PM
problem with dual laser tank Vger Generals & Zero Hour Editing 6 01-02-2004 09:06 AM
Dual Firing Carbon Generals & Zero Hour Editing 3 04-30-2003 10:09 PM


All times are GMT -4. The time now is 07:56 PM.


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