Jump to content


Photo

Adding New Units to Generals


  • Please log in to reply
9 replies to this topic

#1 f22

f22
  • New Members
  • 6 posts

Posted 17 July 2004 - 03:20 AM

I have just started adding units to generals. I am trying to add an apache to the game. I used the commanche's code but changed the model. I can get the tooltip and everything to show up in the game but it won't let me build my unit. The unit is in black and white. Anyone know why this is happening? Heres the code.

Object AmericaVehicleApache

; *** ART Parameters ***
SelectPortrait = SACCommanche_L
ButtonImage = SACCommanche

UpgradeCameo1 = Upgrade_ComancheRocketPods
UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
End
Draw = W3DModelDraw ModuleTag_01

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

ConditionState = REALLYDAMAGED
Model = AVApache_d
Animation = AVLongbow_d.AVLongbow_d
AnimationMode = LOOP
End

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

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

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

ConditionState = RUBBLE SPECIAL_DAMAGED
Model = AVLongbow_d
HideSubObject = AVAPACHE_PROP
End

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

WeaponSet
Conditions = None
; -----
Weapon = PRIMARY Comanche20mmCannonWeapon
PreferredAgainst = PRIMARY INFANTRY
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = SECONDARY ComancheAntiTankMissileWeapon
PreferredAgainst = SECONDARY VEHICLE STRUCTURE
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = TERTIARY NONE
End
WeaponSet
Conditions = PLAYER_UPGRADE
; -----
Weapon = PRIMARY Comanche20mmCannonWeapon
PreferredAgainst = PRIMARY INFANTRY
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = SECONDARY ComancheAntiTankMissileWeapon
PreferredAgainst = SECONDARY VEHICLE STRUCTURE
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = TERTIARY ComancheRocketPodWeapon
AutoChooseSources = TERTIARY NONE
End
ArmorSet
Conditions = None
Armor = ComancheArmor
DamageFX = None
End
BuildCost = 900
BuildTime = 13 ; in seconds
ExperienceValue = 50 50 100 200 ; Experience point value at each level
ExperienceRequired = 0 100 200 400 ; Experience points needed to gain each level
IsTrainable = Yes ; Can gain experience
CommandSet = AmericaVehicleComancheCommandSet

; *** AUDIO Parameters ***
VoiceSelect = ComancheVoiceSelect
VoiceMove = ComancheVoiceMove
VoiceGuard = ComancheVoiceMove
VoiceAttack = ComancheVoiceAttack
SoundAmbient = ComancheAmbientLoop
SoundAmbientRubble = NoSound
SoundDie = ComancheVoiceFalling
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = ComancheVoiceCreate
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
Afterburner = RaptorAfterburner
VoiceGarrison = ComancheVoiceMove
TurretMoveStart = NoSound
TurretMoveLoop = NoSound
VoiceFireRocketPods = ComancheVoiceAttackRocket
End


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

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 = 240.0
InitialHealth = 240.0
End

Behavior = FXListDie ModuleTag_05
DeathFX = FX_HelicopterStartDeath
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 = 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 = 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

Edited by f22, 17 July 2004 - 03:04 PM.


#2 coolfile

coolfile
  • Hosted
  • 50 posts

Posted 17 July 2004 - 03:08 PM

please visit SDI

Edited by coolfile, 17 July 2004 - 03:11 PM.

Do you know Chinese Kung-Fu?

#3 f22

f22
  • New Members
  • 6 posts

Posted 17 July 2004 - 03:33 PM

You have to script the AI in order to build a unit? I was just trying to allow me to use the unit, not the computer. Do you have to script the AI to use the unit?

#4 the_kid

the_kid

    L337 Pwnerer of N00bs

  • Project Team
  • 1,734 posts
  • Location:La$ Vega$, NV
  • Projects:freelancing between what interests me
  •  + TRIPLEhelix

Posted 18 July 2004 - 05:06 AM

whats the name of your model and damaged model... you codes a bit confusing... because you have apache and longbow in quite a few places... and what do you mean by not buildable... can you not click on it or does it build but there is nothing there?

#5 f22

f22
  • New Members
  • 6 posts

Posted 18 July 2004 - 11:38 PM

The game will not let me click on the units button.

#6 Mastermind

Mastermind

    Server Technician

  • Undead
  • 7,014 posts
  • Location:Cambridge, MA
  • Projects:MasterNews 3
  •  The Man Behind the Curtain

Posted 19 July 2004 - 09:36 PM

Where exactly are you trying to build it from? Sometimes the problem isn't the unit, it's the production structure.
:p
Posted Image

Well, when it comes to writing an expository essay about counter-insurgent tactics, I'm of the old school. First you tell them how you're going to kill them. Then you kill them. Then you tell them how you just killed them.

Too cute! | Server Status: If you can read this, it's up |

#7 the_kid

the_kid

    L337 Pwnerer of N00bs

  • Project Team
  • 1,734 posts
  • Location:La$ Vega$, NV
  • Projects:freelancing between what interests me
  •  + TRIPLEhelix

Posted 20 July 2004 - 05:13 PM

I've had this problem before... if it won't let you click it, then its a problem with commandbutton.ini be sure you did everything right in your commandbutton.ini entry for that building...

#8 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 27 July 2004 - 03:27 PM

I'm trying to build my unit from thr airfield.

#9 NVShacker

NVShacker
  • New Members
  • 17 posts

Posted 27 July 2004 - 07:00 PM

Make sure that in commandbutton.ini it references the right unit and is UNIT_BUILD. It's obvious but I've made that mistake enough...

#10 the_kid

the_kid

    L337 Pwnerer of N00bs

  • Project Team
  • 1,734 posts
  • Location:La$ Vega$, NV
  • Projects:freelancing between what interests me
  •  + TRIPLEhelix

Posted 30 July 2004 - 02:24 AM

Make sure that in commandbutton.ini it references the right unit and is UNIT_BUILD. It's obvious but I've made that mistake enough...

<{POST_SNAPBACK}>

yeah, thats what I did wrong




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users