Unknown Editor
8 years ago
Hello everybody who might have some more important business to attend to .
I'm modifing Boss_Airfield to Generate Migs automatically and set a script to command all the landed jets to attack an area ...

Right now I have no idea how to do that ; I did set a script to generate new jets whenever one is destroyed but about area attack 😞 I just did nothing .

I used the following INI but whenever enemy riches the protected area and script triggers the airfield to attack the area , Jets just do nothing and stay Standby in the airfield :


Object Boss_Airfield
 WeaponSet
  Conditions          = None
  Weapon              = PRIMARY AircraftCarrierOrderLaunch
 End
 KindOf               = +AIRCRAFT_CARRIER +CAN_ATTACK

Any Idea how to get this to work ?

THANKS FOR READING 😁
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Sponsor
klingondragon
8 years ago
Have a look at the aircraft carrier code. The planes are special and the carrier has special code to command them. I'll take a look at the code when I get a chance to see if I can find something.
SkyMix_RMT
8 years ago
You might need to create a new MiG just for this since the air craft carrier has its own raptor.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
zzc
  • zzc
  • 50.25% (Neutral)
  • Major
8 years ago
BTW which ini file is the carrier in? I just cannot seem to find it.
klingondragon
8 years ago
I believe it's in the one for American Buildings (or all faction buildings, or maybe misc. units/structures)

Unknown Editor
8 years ago
So , You guys mean I'll need an specific Jet like carrier's Raptors ?

Fortunately Boss_JetMig will do the trick ; I haven't found anything special in Carrier's codes , hope to find some in Raptor's .

Nothing special in Raptors either ...

Maybe it's the "FlightDeckBehavior" ; It auto constructs jets , maybe also makes them able to be commanded by the airfield they're in . But how to set it up in an airfield , No Idea {It just takes too many bones} .
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
klingondragon
8 years ago
First look at the bones of the air field you have just substitute those in and remove the extra ones .
zzc
  • zzc
  • 50.25% (Neutral)
  • Major
8 years ago

I believe it's in the one for American Buildings (or all faction buildings, or maybe misc. units/structures)

Originally Posted by: KlingonDragon 



AmericaAircraftCarrier is in factionbuilding. For some reason I was fixated on it being a unit.



FlightDeckBehavior
[requires AIRCRAFT_CARRIER and FS_AIRFIELD Kindof]
NumRunways = [real number]
NumSpacesPerRunway = [real number]

[N takes numbers from 1-2]
RunwayNSpaces = [Names of Bones of the Model]
RunwayNTakeoff = [Names of Bones of the Model]
RunwayNLanding = [Names of Bones of the Model]
RunwayNTaxi = [Names of Bones of the Model]
RunwayNCreation = [Names of Bones of the Model]
RunwayNCatapultSystem = [Entry From Particlesystem.ini]

HealAmountPerSecond = [integer] [How much health do we give the landed aircraft on our deck?]
ApproachHeight = [integer] [What should the minimum height of aircrafts be in order to land?]
LandingDeckHeightOffset = [integer] [How high is the landing deck?]
ParkingCleanupPeriod = [integer] [How often the carrier checks to move planes forward in the queue to fill empty spaces]
HumanFollowPeriod = [integer] [Human factor for delay like a traffic jam.. takes time to react when the guy in front moves]

[Template of payload, and how quickly destroyed ones get replaced.]
PayloadTemplate = [Object Name] [If theres no defined unit then...no jets for you!]
ReplacementDelay = [integer, milliseconds]
DockAnimationDelay = [integer, milliseconds]

[How quickly a wave of fighters can be launched]
LaunchWaveDelay = [integer, milliseconds]
LaunchRampDelay = [integer, milliseconds]
LowerRampDelay = [integer, milliseconds]
CatapultFireDelay = [integer, milliseconds]
End




Remember to add the kindof to the airfield structure you are using.

And your structure needs this too;

WeaponSet
Conditions = None
Weapon = PRIMARY AircraftCarrierOrderLaunch
End

Weapon.ini entry;

Weapon AircraftCarrierOrderLaunch
PrimaryDamage = 0.00001
PrimaryDamageRadius = 0.0
AttackRange = 1000000.0
DamageType = DEPLOY
DeathType = NORMAL
WeaponSpeed = 0 ; dist/sec
ProjectileObject = NONE
FireFX = None
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AcceptableAimDelta = 180
End

I was just playing around with the carrier in ZH USA02. While it uses a separate Raptor from the airfield type, I am pretty sure it can use any jet that lands at an airfield too.

The attack command will have it attack until the target is destroyed or order cancelled - I tired blasting a commandcenter with it and it really launched every plane out until the building was gone.
zzc
  • zzc
  • 50.25% (Neutral)
  • Major
8 years ago
UserPostedImage

Yup, any airfield jet can be put on a carrier. I'll try it out on an airfield.

I think for the scripting you need to make it as 'attack every enemy within the area'
Unknown Editor
8 years ago
Well , Out of scripting , even when I take the control of it myself , Attack Command does not do anything .
I really need the airfield to generate jets when some fall as I can not just spawn some outside and send them inside for some reasons , and GENERATED UNITS do not have any names to control ; so , I just thought of using aircraft carrier's attack logic

Right now I'm almost certain it's the "FlightDeckBehavior" but I do not know many of bone names' jobs , For example RunwayNTaxi ? Jets themselves are much faster than cars , do they really need a taxi ? I wonder how are they gonna pay the bill 😛
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
klingondragon
8 years ago
Taxiing means moving the plane to the runway from wherever it was.

Had a look at the code. did you add the 'CAN_ATTACK' KindOf as well?
zzc
  • zzc
  • 50.25% (Neutral)
  • Major
8 years ago
The carrier uses this commandset;

CommandSet AmericaAircraftCarrierCommandSet
1 = Command_HiddenConstructAmericaJetAircraftCarrierRaptor
2 = Command_AircraftCarrierFire
11 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End

And these buttons.

CommandButton Command_HiddenConstructAmericaJetAircraftCarrierRaptor
Command = UNIT_BUILD
Options = SCRIPT_ONLY
Object = AmericaJetAircraftCarrierRaptor
End

CommandButton Command_AircraftCarrierFire
Command = FIRE_WEAPON
WeaponSlot = PRIMARY
Options = OK_FOR_MULTI_SELECT NEED_TARGET_ENEMY_OBJECT CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:AircraftCarrierFire
ButtonImage = SACRaptor
CursorName = Target
InvalidCursorName = GenericInvalid
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipFireAircraftCarrier
End

I think you need to make those 2 buttons for your custom structure.
Unknown Editor
8 years ago

Taxiing means moving the plane to the runway from wherever it was.

Originally Posted by: KlingonDragon 


Thanks , so now it makes sences


Had a look at the code. did you add the 'CAN_ATTACK' KindOf as well?

Originally Posted by: KlingonDragon 





Object Boss_Airfield
 WeaponSet
  Conditions          = None
  Weapon              = PRIMARY AircraftCarrierOrderLaunch
 End
 KindOf               = +AIRCRAFT_CARRIER [h]+CAN_ATTACK[/h]

Originally Posted by: Unknown Editor 



The carrier uses this commandset;

CommandSet AmericaAircraftCarrierCommandSet
1 = Command_HiddenConstructAmericaJetAircraftCarrierRaptor
2 = Command_AircraftCarrierFire
11 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End

And these buttons.

CommandButton Command_HiddenConstructAmericaJetAircraftCarrierRaptor
Command = UNIT_BUILD
Options = SCRIPT_ONLY
Object = AmericaJetAircraftCarrierRaptor
End

CommandButton Command_AircraftCarrierFire
Command = FIRE_WEAPON
WeaponSlot = PRIMARY
Options = OK_FOR_MULTI_SELECT NEED_TARGET_ENEMY_OBJECT CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:AircraftCarrierFire
ButtonImage = SACRaptor
CursorName = Target
InvalidCursorName = GenericInvalid
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipFireAircraftCarrier
End

I think you need to make those 2 buttons for your custom structure.

Originally Posted by: zzc 



Thanks for help but I do not think it's gonna make any difference , you know "Command_AircraftCarrierFire" only commands to use the Primary weapon . Weapon obviously works but the Jets , they just don't follow the airfield's target
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
klingondragon
8 years ago
They might not be enslaved properly
Unknown Editor
8 years ago
Maybe , but I still need to check out the airfield's W3D file and try "FlightDeckBehavior" ; if this don't work , then I'll have just no IDEA 😞
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
zzc
  • zzc
  • 50.25% (Neutral)
  • Major
8 years ago



And your structure needs this too;

WeaponSet
Conditions = None
Weapon = PRIMARY AircraftCarrierOrderLaunch
End

Weapon.ini entry;

Weapon AircraftCarrierOrderLaunch
PrimaryDamage = 0.00001
PrimaryDamageRadius = 0.0
AttackRange = 1000000.0
DamageType = DEPLOY
DeathType = NORMAL
WeaponSpeed = 0 ; dist/sec
ProjectileObject = NONE
FireFX = None
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AcceptableAimDelta = 180
End

I was just playing around with the carrier in ZH USA02. While it uses a separate Raptor from the airfield type, I am pretty sure it can use any jet that lands at an airfield too.

The attack command will have it attack until the target is destroyed or order cancelled - I tired blasting a commandcenter with it and it really launched every plane out until the building was gone.

Originally Posted by: zzc 



The carrier has a weapon which is used to launch its jets. Its likely you need to add it in to make it work?

Unknown Editor
8 years ago
Alright , I've tried "FlightDeckBehavior" ; It works , the jets attack where I ask airfield to , but I'm just having too many Bone Problems 💀

Jets don't seem to move right :ashamed:

Boss_Airfield Flight Bones :

Runway1Parking1
Runway1Parking2
Runway2Parking1
Runway2Parking2
Runway1Park1Han
Runway1Park2Han
Runway2Park1Han
Runway2Park2Han
Runway1Prep1
Runway1Prep2
Runway2Prep1
Runway2Prep2
RunwayStart1
RunwayStart2
RunwayEnd1
RunwayEnd2


My INI :

Object Boss_Airfield
RemoveModule ModuleTag_10
 AddModule
  Behavior                 = FlightDeckBehavior ModuleTag_Flight
   NumRunways              = 2
   NumSpacesPerRunway      = 2

   Runway1Spaces           = Runway1Park1Han Runway1Park2Han
   Runway1Takeoff          = RunwayStart1 RunwayEnd1
   Runway1Landing          = RunwayEnd1 RunwayStart1
   Runway1Taxi             = Runway1Prep1 Runway1Prep2
   Runway1Creation         = Runway1Park1Han Runway1Park2Han
   Runway1CatapultSystem   = AircraftCarrierCatapultSteamParent

   Runway2Spaces           = Runway2Park1Han Runway2Park2Han
   Runway2Takeoff          = RunwayStart2 RunwayEnd2
   Runway2Landing          = RunwayEnd2 RunwayStart2
   Runway2Taxi             = Runway2Prep1 Runway2Prep2
   Runway2Creation         = Runway2Park1Han Runway2Park2Han
   Runway2CatapultSystem   = AircraftCarrierCatapultSteamParent

   HealAmountPerSecond     = 50
   ApproachHeight          = 50
  ;LandingDeckHeightOffset = 45.0
  ;ParkingCleanupPeriod    = 533
  ;HumanFollowPeriod       = 333

   PayloadTemplate         = Boss_JetMig
   ReplacementDelay        = 10000
   DockAnimationDelay      = 3000

   LaunchWaveDelay         = 3000
   LaunchRampDelay         = 667
   LowerRampDelay          = 600
   CatapultFireDelay       = 750
  End
 End
 WeaponSet
  Conditions = None
  Weapon     = PRIMARY AircraftCarrierOrderLaunch
 End
 VisionRange = 750.0
 KindOf      = +AIRCRAFT_CARRIER +CAN_ATTACK
End


And Also , Doors : Will be opened , then closed , like a Warfactory 😞
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
zzc
  • zzc
  • 50.25% (Neutral)
  • Major
8 years ago
I think I see the possible cause of the movement problem.

The flightdeckbehavior module uses taxi bones which I think the airfield structure does not have.

As for the door closing, did you remove the ParkingPlaceBehavior madule from the structure? Or the flightdeckbehavior is conflicting because it has no parking space definition?

I figure Klingon can answer these model things better than me, I am just putting out suggestions.
zzc
  • zzc
  • 50.25% (Neutral)
  • Major
8 years ago
Some notes from an old thread;

Same thing will happen.

Originally Posted by: Annihilationzh 


I think he means an airfield that automatically produces planes, and has planes land on the back and take off from the front.

All you need is an airfield model with all the bones of an aircraft carrier.

Originally Posted by: Gameanater 



Why hangars? I thought you were making an airfield/aircraft carrier hybrid. The planes on the carrier never stop in a hangar, they only sit in a queue.

Originally Posted by: Annihilationzh 





The topic;
http://www.cnclabs.com/forums/cnc_postst15746_Question--has-anyone-thought-to-make-the-aircraft-carrier-a-Flying-object.aspx 
klingondragon
8 years ago
I would like a copy of this ini so I can see how they move in my game . Working out which bones do what where may take some time.