heres the code!!
put this in CommandButton.ini
CommandButton Command_Bail
Command = OBJECT_UPGRADE
Upgrade = Upgrade_VehicleBail
Options = OK_FOR_MULTI_SELECT NOT_QUEUEABLE
TextLabel = Whatever ; you can make a new string if you like!
ButtonImage = SAPilot
ButtonBorderType = ACTION
DescriptLabel = Whatever ;you can make a new string if you like!
End
Put this in weapons.ini
Weapon CarBail
PrimaryDamage = 0.0
PrimaryDamageRadius = 0.1
DamageType = KILL_PILOT
DeathType = NORMAL
WeaponSpeed = 99999.0
AttackRange = 5.0
ProjectileObject = NONE
DamageDealtAtSelfPosition = Yes
RadiusDamageAffects = SELF SUICIDE ALLIES
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 0
AutoReloadsClip = Yes
End
Put this two code in ObjectCreationList.ini file!
ObjectCreationList OCL_PilotBail
CreateObject
Offset = X:5 Y:10 Z:0
ObjectNames = AmericaInfantryPilot
PutInContainer = AmericaParachute
InheritsVeterancy = Yes
IgnorePrimaryObstacle = Yes
Disposition = LIKE_EXISTING
Count = 1
RequiresLivePlayer = No
End
End
;-----------------------------------------------
ObjectCreationList OCL_VehicleBailer
CreateObject
Offset = X:0 Y:0 Z:0
ObjectNames = AmericaVehicleBailer
IgnorePrimaryObstacle = Yes
Disposition = LIKE_EXISTING
Count = 1
RequiresLivePlayer = No
End
End
put this 3 code into whatever unit you want to bail its pilot!
Behavior = ObjectCreationUpgrade ModuleTag_13
UpgradeObject = OCL_PilotBail
TriggeredBy = Upgrade_VehicleBail
End
Behavior = ObjectCreationUpgrade ModuleTag_14
UpgradeObject = OCL_VehicleBailer
TriggeredBy = Upgrade_VehicleBail
End
Behavior = ProductionUpdate ModuleTag_15
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
make a new command set to the heli unit or plane
;__________(DEMO COMMAND SET)__________
CommandSet AirF_AmericaJetRaptorCommandSet
1 = Command_Bail
12 = Command_GuardFlyingUnitsOnly
11 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End
and the last code put this in americavehicle.ini
Object AmericaVehicleBailer
; ***DESIGN parameters *** DisplayName = OBJECT:Bailer
Side = America
EditorSorting = VEHICLE
ArmorSet
Armor = TruckArmor
End
VisionRange = 1
ShroudClearingRange = 0
WeaponSet
Conditions = None
Weapon = PRIMARY HijackVehicle
End
; *** ENGINEERING Parameters ***
KindOf = CAN_ATTACK PROJECTILE
RadarPriority = LOCAL_UNIT_ONLY
Body = ActiveBody ModuleTag_02
MaxHealth = 10.0
InitialHealth = 10.0
End
Behavior = DestroyDie ModuleTag_03
DeathTypes = ALL
End
Behavior = ConvertToHijackedVehicleCrateCollide ModuleTag_08
RequiredKindOf = VEHICLE ; This is my car now, infidel!
End
Behavior = AIUpdateInterface ModuleTag_09
End
Behavior = PhysicsBehavior ModuleTag_10
Mass = 1.0
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_22
DeathWeapon = CarBail
StartsActive = Yes
DeathTypes = ALL
End
Behavior = LifetimeUpdate ModuleTag_23
MinLifetime = 0 ; min lifetime in msec
MaxLifetime = 0 ; max lifetime in msec
End
Behavior = UpgradeDie ModuleTag_24
DeathTypes = ALL
UpgradeToRemove = Upgrade_VehicleBail ModuleTag_25
End
Geometry = BOX
GeometryIsSmall = Yes
GeometryMajorRadius = 11.0
GeometryMinorRadius = 4.0
GeometryHeight = 7.0
Shadow = SHADOW_VOLUME
End
tada!! the Bail out code!! so you can land heli's anywhere!
|