View Single Post
Old 09-21-2004, 05:30 PM   #1 (permalink)
adamstrange
Senior Member
 
Join Date: Dec 2002
Posts: 338
Default Problem with this code?

I'm making a unit that will launch 10 hellfire drones.

I'm useing the POW truck and i want the superweapons general to get it only when he captures a reinforcment pad.

Now everytime when the reinforcment pad drop off counter reaches 0 the game crashes.

Here is the code:

SUPERWEAPONS GENERAL
;------------------------------------------------------------------------------
Object AmericaDroneAttackVehicle
; *** ART Parameters ***
SelectPortrait = SAPowTruck
ButtonImage = SAPowTruck
;UpgradeCameo3 = Upgrade_AmericaHellfireDrone
;UpgradeCameo4 = Upgrade_AmericaAdvancedTraining
;UpgradeCameo5 = Upgrade_AmericaCompositeArmor
Draw = W3DTruckDraw ModuleTag_01
OkToChangeModelColor = Yes
ConditionState = NONE
Model = AVPOWTRUCK
End
ConditionState = REALLYDAMAGED
Model = AVPOWTRUCK_D
End
ConditionState = RUBBLE
Model = AVPOWTruck_D
End
TrackMarks = EXTireTrack.tga
Dust = RocketBuggyDust
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
MidLeftRearTireBone = Tire03
MidRightRearTireBone = Tire05
LeftRearTireBone = Tire04
RightRearTireBone = Tire06
TireRotationMultiplier = 0.2 ; this * speed = rotation.
PowerslideRotationAddition = 2.5 ; This speed is added to the rotation speed when powersliding.
End
; ***DESIGN parameters ***
DisplayName = OBJECT:POWTruck
Side = America
EditorSorting = VEHICLE
TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
ArmorSet
Conditions = None
Armor = TruckArmor
DamageFX = TankDamageFX
End
; nope, sorry, can't build it. (srj)
Buildable = No
;BuildCost = 500
;BuildTime = 10.0 ;in seconds
VisionRange = 200
ShroudClearingRange = 300
ExperienceValue = 50 50 50 50 ;Experience point value at each level
ExperienceRequired = 0 150 450 900 ;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

; *** AUDIO Parameters ***
VoiceSelect = POWTruckUSAVoiceSelect
VoiceMove = POWTruckUSAVoiceMove
VoiceGuard = POWTruckUSAVoiceMove
SoundEnter = POWTruckEnter
SoundExit = POWTruckExit
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = POWTruckUSAVoiceCreate
TurretMoveLoop = TurretMoveLoop
SoundMoveStart = POWTruckUSAMoveStart
SoundMoveStartDamaged = POWTruckUSAMoveStart
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
VoiceCrush = POWTruckUSAVoiceCrush
; Required for the W3DTruckDraw module
TruckLandingSound = RocketBuggyLand
TruckPowerslideSound = POWTruckUSAMoveStart
VoiceEnter = POWTruckUSAVoiceMove
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS VEHICLE TRANSPORT SCORE
Body = ActiveBody ModuleTag_02
MaxHealth = 500.0
InitialHealth = 500.0
End



Behavior = TransportAIUpdate ModuleTag_04
AutoAcquireEnemiesWhenIdle = Yes
MoodAttackCheckRate = 250
End
Behavior = AIUpdateInterface ModuleTag_25
; no data
End
Locomotor = SET_NORMAL POWTruckLocomotor
Behavior = PhysicsBehavior ModuleTag_03
Mass = 50.0
End



Behavior = TransportContain ModuleTag_05
PassengersAllowedToFire = Yes
Slots = 10
; EnterSound = GarrisonEnter
; ExitSound = GarrisonExit
DamagePercentToUnits = 100% ;10%
AllowInsideKindOf = INFANTRY
ExitDelay = 250
NumberOfExitPaths = 3 ; Defaults to 1. Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
End

Behavior = ObjectCreationUpgrade ModuleTag_06
UpgradeObject = OCL_AmericanHellfireDrone2
TriggeredBy = Upgrade_AmericaHellfireDrone2
ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaScoutDrone
End


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

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



Behavior = SlowDeathBehavior ModuleTag_07
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 25
DestructionDelay = 1
FX = FINAL FX_BattleMasterExplosionOneFinal
OCL = FINAL OCL_AmericanPOWTruckDeathEffect
End
Behavior = FXListDie ModuleTag_08
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = TransitionDamageFX ModuleTag_09
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
Behavior = ExperienceScalarUpgrade ModuleTag_10
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
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 = 7.0
GeometryHeight = 13.5
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
End

OBJECT CREATION LIST
; -----------------------------------------------------------------------------
; Certain American vehicles can spawn slaved battle drones
; -----------------------------------------------------------------------------
ObjectCreationList OCL_AmericanHellfireDrone2
CreateObject
Offset = X:0 Y:0 Z:10
ObjectNames = AmericaVehicleHellfireDrone
IgnorePrimaryObstacle = Yes
Disposition = LIKE_EXISTING
Count = 10
RequiresLivePlayer = Yes
End
End
adamstrange is offline   Reply With Quote