nah not yet, but an idea I have is to have a repairhut as a civilian unit with a locomotor of 0 or 0.000001 so it wont move. Now create the actual bridge itself and have it automatically start on the map. Also, create a bone in the repair hut w3d, but a faid distance from it, where you want the bridge to spawn. Call it "BridgeCreate". There would have to be a way to trigger the bridge to be created again by accessing this unit.
I used the same logic with my missile tank upgrade, the chain gun bit and the actual missile tank are stored in seperate w3d files, AusVmtank.w3d and mtankupgrade.w3d and when the upgrade is triggered, the upgrade is spawned from a bone named "FIREPOINT01", which sits just next to the first HOUSECOLOR object
Now in FactionUnit.ini i added the following extra module tags to my Missile Tank
Code:
Behavior = OverlordContain ModuleTag_06
Slots = 1
DamagePercentToUnits = 100%
AllowInsideKindOf = PORTABLE_STRUCTURE
PassengersAllowedToFire = Yes
PassengersInTurret = Yes
End
Behavior = ObjectCreationUpgrade ModuleTag_07
UpgradeObject = OCL_MissileTankChainGuns
TriggeredBy = Upgrade_AustraliaTankMissileTankUpgrade
End
I don't think it would be necessary to do this in the case of the bridge I would have to test this out. The ModuleTags however may also work with a repirable structure, which can be repaired by a dozer, again I will have to test this out.
Now I defined the upgrade as any normal unit up to a point
Code:
Object AustraliaTankMissileTankChainGuns
; *** ART Parameters ***
SelectPortrait = SNGatTower_L
ButtonImage = SNGatTower
;UpgradeCameo1 = XXX
UpgradeCameo1 = XXX
UpgradeCameo2 = XXX
;UpgradeCameo4 = XXX
UpgradeCameo5 = XXX
Draw = W3DDependencyModelDraw ModuleTag_01
OkToChangeModelColor = Yes
AttachToBoneInContainer = FIREPOINT01
DefaultConditionState
Model = MTANKUPGRADE
Turret = TURRET01
TurretPitch = TURRETEL
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponFireFXBone = SECONDARY Muzzle
WeaponMuzzleFlash = SECONDARY MuzzleFX
End
ConditionState = CONTINUOUS_FIRE_SLOW
Model = MTANKUPGRADE
Animation = MTANKUPGRADE.MTANKUPGRADE
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.1 0.1 ;set this state to animate s l o w l y
End
ConditionState = CONTINUOUS_FIRE_MEAN
Model = MTANKUPGRADE
Animation = MTANKUPGRADE.MTANKUPGRADE
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.2 0.2 ;set this state to animate medium-fast
End
ConditionState = CONTINUOUS_FIRE_FAST
Model = MTANKUPGRADE
Animation = MTANKUPGRADE.MTANKUPGRADE
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.3 0.3 ;set this state to animate vryfst
ParticleSysBone = Muzzle01 GattlingMuzzleSmoke
ParticleSysBone = Muzzle02 GattlingMuzzleSmoke
End
ConditionState = REALLYDAMAGED
Model = MTANKUPGRADE_D
Turret = TURRET01
TurretPitch = TURRETEL
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponFireFXBone = SECONDARY Muzzle
WeaponMuzzleFlash = SECONDARY MuzzleFX
End
ConditionState = CONTINUOUS_FIRE_SLOW REALLYDAMAGED
Model = MTANKUPGRADE_D
Animation = MTANKUPGRADE_D.MTANKUPGRADE_D
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.1 0.1 ;set this state to animate s l o w l y
End
ConditionState = CONTINUOUS_FIRE_MEAN REALLYDAMAGED
Model = MTANKUPGRADE_D
Animation = MTANKUPGRADE_D.MTANKUPGRADE_D
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.2 0.2 ;set this state to animate medium-fast
End
ConditionState = CONTINUOUS_FIRE_FAST REALLYDAMAGED
Model = MTANKUPGRADE_D
Animation = MTANKUPGRADE_D.MTANKUPGRADE_D
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.3 0.3 ;set this state to animate vryfst
ParticleSysBone = Muzzle01 GattlingMuzzleSmoke
ParticleSysBone = Muzzle02 GattlingMuzzleSmoke
End
End
; ***DESIGN parameters ***
Side = Australia
EditorSorting = SYSTEM
TransportSlotCount = 1
blah, blah, blah :lol:
The important bit comes with the ArmorSet:
Code:
ArmorSet
Conditions = None
Armor = InvulnerableAllArmor
End
VisionRange = 200
This pretty much states that the chain guns upgrade object shares its damage module with that of the host, being the Missile Tank. If the Missile Tank gets wasted, so will the chain guns.
Now if we added this armor set to the bridge unit, then this would mean that the bridge would share its damage value with the repair hut, and could be repairable through the bridge hut.
Next, would come the problem of having units actually crossing over the bridge "unit". Maybe this would work by adding an entry bone at either side of the bridge and an "exitstart" bone next to it and "exitend" bone at the end of the bridge.
I will work on this however as I do, after looking at all this I have stated, believe destroyable and repairable bridges are quite possible.