;===============================================
;PRELUDE
;------------------------------------------------------------------------------------
I have not been able to solve this problem yet.
I have searched the forums and it has been solved but the solution is never posted clearly afterwords.
;===============================================
;===============================================
WANTED RESULT:
;------------------------------------------------------------------------------------
I want to attach an object on top of another, just like the overlord has upgrades for attachements.
I have a unit that will have a upgrade for a rockect turret on its back
I have a command center that will spawn with 5 built in turrets
and I am sure I will be using this attachement method more for other objects in game.
;===============================================
PROBLEM:
;------------------------------------------------------------------------------------
The attachment is functional but does not do the following:
The attachement does not sit on the FIREPOINT bone
The attahement does sits at the pivot point base of its parent object
The attachement does not move with the turret piece
;===============================================
To make it easier to figure out I have created a test object
It is quite simple. A box with a FIREPOINT bone. The object will be a building with code added from the overlord. It will have the overlord command set so it should be able to just build a gattling gun on top. This prevents me from having to write an Upgrade or OLC so I can make sure thoes are not the problem.
Just so you know. I have linked the firepoint bone to the box which I renamed CHASSIS for no particular reason. I am modding for Generals, not ZeroHour for particular reasons.
Want to see the box? here it is!
[img]http://img240.imageshack.us/img240/1209/box3vc.jpg/img]
Want to see my code? here it is!
Code:
;MOUNT TEST
Object BOX
Draw = W3DOverlordTankDraw ModuleTag_01
;Draw = W3DModelDraw ModuleTag_01
ExtraPublicBone = FIREPOINT01
OkToChangeModelColor = Yes
ConditionState = NONE
Model = BOX
End
End
PlacementViewAngle = -135
;#### DESIGN PARAMETERS ##############################################################################################################################
DisplayName = OBJECT:DarkFortress
Side = America
EditorSorting = STRUCTURE
BuildCost = 2000
BuildTime = 5.0 ; in seconds
EnergyProduction = 0 ;Command Center should be free
CommandSet = ChinaTankOverlordDefaultCommandSet
VisionRange = 300.0 ; Shroud clearing distance
ShroudClearingRange = 300
ArmorSet
Conditions = None
Armor = StructureArmorTough
DamageFX = StructureDamageFXNoShake
End
ExperienceValue = 200 200 200 200 ; Experience point value at each level
;#### AUDIO PARAMETERS ###############################################################################################################################
VoiceSelect = CommandCenterUSASelect
SoundDie = BuildingDie
SoundOnDamaged = BuildingDamagedStateLight
SoundOnReallyDamaged = BuildingDestroy
UnitSpecificSounds
UnderConstruction = UnderConstructionLoop
End
;#### ENGINEERING PARAMETERS #########################################################################################################################
RadarPriority = STRUCTURE
KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE COMMANDCENTER SCORE CAPTURABLE FS_FACTORY AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY
Body = StructureBody ModuleTag_08
MaxHealth = 1000.0
InitialHealth = 1000.0
End
Behavior = PreorderCreate ModuleTag_PreorderCreate
End
Behavior = OverlordContain ModuleTag_06 ; Like Transport, but when full, passes transport queries along to first passenger (redirects like tunnel)
Slots = 1
DamagePercentToUnits = 100%
AllowInsideKindOf = PORTABLE_STRUCTURE
PassengersAllowedToFire = Yes
PassengersInTurret = Yes ; My passengers ride in my turret, that's where the Firepoint bones are
End
Behavior = ObjectCreationUpgrade ModuleTag_07
UpgradeObject = OCL_OverlordGattlingCannon
TriggeredBy = Upgrade_ChinaOverlordGattlingCannon
ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
End
Behavior = ObjectCreationUpgrade ModuleTag_08
UpgradeObject = OCL_OverlordPropagandaTower
TriggeredBy = Upgrade_ChinaOverlordPropagandaTower
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker
End
Behavior = ObjectCreationUpgrade ModuleTag_09
UpgradeObject = OCL_OverlordBattleBunker
TriggeredBy = Upgrade_ChinaOverlordBattleBunker
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower
End
Behavior = ProductionUpdate ModuleTag_10
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
Behavior = CommandSetUpgrade ModuleTag_11
CommandSet = ChinaTankOverlordGattlingCannonCommandSet
TriggeredBy = Upgrade_ChinaOverlordGattlingCannon
ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
End
Behavior = CommandSetUpgrade ModuleTag_12
CommandSet = ChinaTankOverlordPropagandaTowerCommandSet
TriggeredBy = Upgrade_ChinaOverlordPropagandaTower
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker
End
Behavior = CommandSetUpgrade ModuleTag_13
CommandSet = ChinaTankOverlordBattleBunkerCommandSet
TriggeredBy = Upgrade_ChinaOverlordBattleBunker
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower
End
Behavior = RadarUpdate ModuleTag_12
RadarExtendTime = 4000 ;in mSeconds
End
Behavior = DefaultProductionExitUpdate ModuleTag_13
UnitCreatePoint = X: 0.0 Y: 0.0 Z:0.0
NaturalRallyPoint = X: 80.0 Y: 0.0 Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
End
Behavior = DestroyDie ModuleTag_15
;nothing
End
Behavior = CreateObjectDie ModuleTag_16
CreationList = OCL_LargeStructureDebris
End
Behavior = CreateObjectDie ModuleTag_17
CreationList = OCL_AmericanRangerDebris10
ExemptStatus = UNDER_CONSTRUCTION
End
Behavior = FXListDie ModuleTag_18
DeathFX = FX_StructureMediumDeath
End
Behavior = FlammableUpdate ModuleTag_30
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 5 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Geometry = BOX
GeometryMajorRadius = 20
GeometryMinorRadius = 20
GeometryHeight = 150
GeometryIsSmall = No
FactoryExitWidth = 0 ; How much space to leave for units exiting.
Shadow = SHADOW_VOLUME
BuildCompletion = PLACED_BY_PLAYER
End
What would be really helpfully is a good explanation with steps on what needs to be added for my turret to work.
Please Help me. I tired to Make this post the best I could