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

Forum Info
Forum Members: 18,581
Total Threads: 8,667
Posts: 94,503

Administrators:
DeeZire, Redemption

There are currently 48 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-21-2004, 05:30 PM   #1 (permalink)
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  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-22-2004, 02:05 PM   #2 (permalink)
Senior Member
 
Join Date: Dec 2002
Location: Earth
Posts: 339
Send a message via MSN to FleetCommand Send a message via Yahoo to FleetCommand
Default

I have a few idea but first and foremost, run Zero Hour World Builder and see if it finds any error in the INI files. Remeber that they INI files are case sensitive.
FleetCommand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-22-2004, 02:32 PM   #3 (permalink)
Senior Member
 
Join Date: Jun 2003
Posts: 462
Send a message via AIM to Kelso Send a message via MSN to Kelso
Default

World Builder won't help. It only checks runtime stuff, so if the game boots up then worldbuilder will as well. I'm really confused by your code though. What is the code for the OCL for the actual dropping off of the unit at the reinforcement pad? Also, taking away Buildable = No because that might screw with it. You can leave it out and then not make a commandbutton for it and it then essentially is not buildable.
Kelso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-22-2004, 05:33 PM   #4 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 338
Default

Well i had gotten the transport plane to drop them off but there were no hellfire drones so i decided to make them buildable but the game does not want to start.

I tracked the problem to the commandset but cannot figure out what is wrong with the code:

CommandSet SupW_AmericaVehicleDroneAttackTransport
1 = SupW_Command_ConstructAmericaVehicleHellfireDrone2
2 = Command_TransportExit
3 = Command_TransportExit
4 = Command_TransportExit
5 = Command_TransportExit
6 = Command_TransportExit
7 = Command_TransportExit
8 = Command_TransportExit
9 = Command_TransportExit
10 = Command_TransportExit
11 = Command_Evacuate
12 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End




;------------------ SUPERWEAPONS GENERAL --------------------------

CommandSet SupW_AmericaWarFactoryCommandSet
1 = SupW_Command_ConstructAmericaVehicleHumvee
2 = SupW_Command_ConstructAmericaVehicleMortarTruck
3 = SupW_Command_ConstructAmericaVehicleTomahawk
4 = SupW_Command_ConstructAmericaVehicleMedic
6 = SupW_Command_ConstructAmericaVehicleSentryDrone
7 = SupW_Command_ConstructAmericaVehicleAvenger
8 = SupW_Command_ConstructAmericaVehicleMicrowave
9 = SupW_Command_ConstructAmericaVehicleDroneAttackTra nsport
11 = Command_UpgradeAmericaTOWMissile
12 = Command_UpgradeAmericaSentryDroneGun
13 = Command_SetRallyPoint
14 = Command_Sell
End

I lost count on how many hours i spent so far for several days trying to get this to work.
adamstrange is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2004, 02:12 AM   #5 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 338
Default

I finally figured it out. It took me the entire day.

Now i just have to make it a little less powerful because i increased the health on the PT and on the drones and increased the damage of the hellfire missiles.

It cost $2500,but with 8 missile defenders that can fire out of it and 10 hellfire drones...its a bargain
adamstrange is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2004, 02:38 AM   #6 (permalink)
Senior Member
 
Join Date: Dec 2002
Location: Earth
Posts: 339
Send a message via MSN to FleetCommand Send a message via Yahoo to FleetCommand
Default

Quote:
Originally Posted by Kelso
World Builder won't help. It only checks runtime stuff, so if the game boots up then worldbuilder will as well. I'm really confused by your code though. What is the code for the OCL for the actual dropping off of the unit at the reinforcement pad? Also, taking away Buildable = No because that might screw with it. You can leave it out and then not make a commandbutton for it and it then essentially is not buildable.
You are wrong about world builder.

Just as the Commander Deezire mentioned in his tutorial, Zero Hour World Builder will certainly help in places where no mankind expects. Only just a simple and hidden mistake like AirField instead of Airfield can screw thing up. Even if you're sure, first things are first. The fact is that 90 precent of the problems involving a game crash is identified by just running the world builder. The World Builder does not always boot up error free where the game does. It is also another fact that game rarely crash because of logical mistakes - crashes are results of structural (spelling and grammatical) mistakes. The only exception is a bug that I found and mention in the Stickey post: Trade Secrets Revealed.

No more arguement - running the World Builder takes few seconds and sure helps very much.

After the first is done with, I see that Adamstrange has finally solved his own problem. Your ideas, Kelso, also seems useful - but, Adamstrange, will you tell us what exactly was he problem. I am interested to know.
FleetCommand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2004, 02:54 AM   #7 (permalink)
Senior Member
 
Join Date: Dec 2002
Location: Earth
Posts: 339
Send a message via MSN to FleetCommand Send a message via Yahoo to FleetCommand
Default

I have just downloaded a mod that has vehicle much like yours: The Combat Drone Carrier. It maintains a group of 10 Hellfire drones without the need of upgrade. When one of them is down and out, it manufactures another. It can be upgraded with a Utility Drone, which is a drone that scouts the area, identifies camouflaged units and repairs its master. It must be upgraded on a generals command.
FleetCommand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2004, 08:12 AM   #8 (permalink)
Senior Member
 
Join Date: Aug 2004
Location: Augsburg, Bavaria, Germany
Posts: 127
Send a message via MSN to theliberator2005 Send a message via Yahoo to theliberator2005
Default

Isn't this also the solution for the Aircraft carrier??

I mean, if I could let my unit spawn a load of drones, then I couls also replace the model of the Vehicle with the aircraft carrier and replace the Drones with aircrafts
theliberator2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2004, 11:43 AM   #9 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 338
Default

The way the AXIR OF THE MATRIX mod coded their PT was to use the AMERICAN CINE ini and put this in the code:

CommandSet = SupW_AmericaVehiclePowTruckCommandSet
Buildable = Yes

I also had to create the proper CommandSet and then create a new drone in the SW Gen's INI ,SupW_AmericaVehicleHellfireDrone2 ,

Create a new OCL in the OCL ini for the new drone-OCL_SupW_AmericaVehicleHellfireDrone2

that way only this unit would have 10 drones and not every unit that has drone capabilites.
I then had to give the unit UpGRADE TO AMERICANHELLFIRE DRONE cameo and code.

Before i kept giving it upgrade to AMERICANHELLFIREDRONE2 and that would not work so i had to put the code like this:

Behavior = ObjectCreationUpgrade ModuleTag_10
UpgradeObject = OCL_SupW_AmericaVehicleHellfireDrone2
TriggeredBy = Upgrade_AmericaHellfireDrone
ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaScoutDrone
End

FleetCommand,What mod is it that has the PT ? I think i may want to use that code for my unit.

Now i'm thinking of useing the unused firebase that in the W3D file because the cannon pops out and what i would like is to have it stay under its base but when an enemy is detected ,it will pop out and fire at him.

Anyone of a mod that has this enabled?
adamstrange is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2004, 12:33 PM   #10 (permalink)
Senior Member
 
Join Date: Dec 2002
Location: Earth
Posts: 339
Send a message via MSN to FleetCommand Send a message via Yahoo to FleetCommand
Default

The mod I mentioned having a Drone Carrier does not use a prison truck. It is originally a re-modeled Kushan Drone Frigate introduced in Homeworld by Sierra Online - a conversion from a spaceship into a vehicle.

The Mod uses the SpawnBehavior module to control and maintain drones and also take control of drones with lost masters but the main utility drone is actually a normally coded drone.

I'm currently in a hurry. I'll extract the download URL and I'll post it here later. Sorry now.
FleetCommand 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
Animation Code problem Retnuh Generals & Zero Hour Editing 12 01-18-2005 12:51 PM
Problem with code[solved] Silent_Killa Generals & Zero Hour Editing 10 11-02-2004 01:25 AM
SMALL CODE, BIG PROBLEM heartless_ali Generals & Zero Hour Editing 7 08-13-2004 05:36 AM
Help with code. Vanguard Generals & Zero Hour Editing 0 06-15-2004 11:52 AM
Problem with code juanmanuelsanchez Generals & Zero Hour Editing 5 03-01-2004 06:28 PM


All times are GMT -4. The time now is 07:11 AM.


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