Posted by: Unknown Editor - Sunday, March 25, 2018 4:53:35 AM
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 [sad] 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 :
[code=plain]
Object Boss_Airfield
WeaponSet
Conditions = None
Weapon = PRIMARY AircraftCarrierOrderLaunch
End
KindOf = +AIRCRAFT_CARRIER +CAN_ATTACK
[/code]
Any Idea how to get this to work ?
THANKS FOR READING [grin]
Posted by: klingondragon - Sunday, March 25, 2018 4:05:22 PM
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.
Posted by: SkyMix_RMT - Sunday, March 25, 2018 8:19:11 PM
You might need to create a new MiG just for this since the air craft carrier has its own raptor.
Posted by: zzc - Sunday, March 25, 2018 9:37:15 PM
BTW which ini file is the carrier in? I just cannot seem to find it.
Posted by: klingondragon - Monday, March 26, 2018 4:57:41 AM
I believe it's in the one for American Buildings (or all faction buildings, or maybe misc. units/structures)
Posted by: Unknown Editor - Monday, March 26, 2018 8:00:18 AM
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} .
Posted by: klingondragon - Monday, March 26, 2018 8:30:27 AM
First look at the bones of the air field you have just substitute those in and remove the extra ones .
Posted by: zzc - Monday, March 26, 2018 8:50:27 PM
FlightDeckBehavior
[h][requires AIRCRAFT_CARRIER and FS_AIRFIELD Kindof][/h]
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
Posted by: zzc - Monday, March 26, 2018 9:10:03 PM
[img=https://i.imgur.com/atebaFY.jpg]Any airfield type jet[/img]
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'
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 [stuck_out_tongue]
Posted by: klingondragon - Monday, March 26, 2018 10:20:14 PM
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?
Posted by: zzc - Monday, March 26, 2018 10:39:22 PM
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.
[quote=KlingonDragon;147369]Taxiing means moving the plane to the runway from wherever it was.[/quote]
Thanks , so now it makes sences
[quote=KlingonDragon;147369]
Had a look at the code. did you add the 'CAN_ATTACK' KindOf as well?[/quote]
[quote=Unknown Editor;147340]
[code=plain]
Object Boss_Airfield
WeaponSet
Conditions = None
Weapon = PRIMARY AircraftCarrierOrderLaunch
End
KindOf = +AIRCRAFT_CARRIER [h]+CAN_ATTACK[/h]
[/code][/quote]
[quote=zzc;147371]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.[/quote]
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
Posted by: klingondragon - Monday, March 26, 2018 11:19:55 PM
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 [sad]
Posted by: zzc - Tuesday, March 27, 2018 1:12:44 AM
[quote=zzc;147365]
And your structure needs this too;
[h] WeaponSet
Conditions = None
Weapon = PRIMARY AircraftCarrierOrderLaunch
End
[/h]
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.[/quote]
The carrier has a weapon which is used to launch its jets. Its likely you need to add it in to make it work?
Posted by: Unknown Editor - Tuesday, March 27, 2018 3:05:32 AM
Posted by: zzc - Tuesday, March 27, 2018 3:39:08 AM
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.
Posted by: zzc - Tuesday, March 27, 2018 3:48:31 AM
Some notes from an old thread;
[quote=Annihilationzh;139483][quote=Gameanater;139481]Same thing will happen.[/quote]
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.[/quote]
[quote=Annihilationzh;139518]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.[/quote]
The topic;
http://www.cnclabs.com/forums/cnc_postst15746_Question--has-anyone-thought-to-make-the-aircraft-carrier-a-Flying-object.aspx
Posted by: klingondragon - Tuesday, March 27, 2018 5:52:20 AM
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.
Posted by: zzc - Wednesday, March 28, 2018 11:36:40 PM
Imo the airfield probly needs all the carrier model bone names to function like a carrier on land. Until then maybe for a quick fix you can just copy all the text inside the carrier building entry to the boss airfield building entry.
Of course that will look awfully weird; a monster size building inside the boss base.... reduce the scale?
Posted by: qqqqqqqqqp - Tuesday, May 1, 2018 1:12:16 PM
I thought this was going to be asking for a working aircraft carrier unit. Glad it wasn't getting that thing to work is super annoying.
Well , At the last I just bite the Bullet and used a new Player to control the Jets .
It is all rendered by the appropriate scripts ; Including Cool down Construction Time
Big Attack Area (300% Bigger than Migs Sight Range)
And that they will land into the Airfield if there is no enemy in the triggered area (To make 'em look more realistic)