![]() |
#1
|
|||
|
|||
![]()
Well our campaign is nearly ready and everyday the "grail patch" draws closer. The big question still remains. How to coordinate (especially red players) into action realistically during our missions. We could simply direct the squadrons in the air and then use one of the following:
Obviously the most realistic method would be have a fighter command to plot and direct red squadrons where they are needed. However I dont see anyone comming forward to do this. This thread wexplains how it might happen: http://forum.1cpublishing.eu/showthread.php?t=30918 Triggers are the next obvious solution. However Triggers are a dead cert! There is no room for error which is unrealistic. Also the Orange writing is a massive immertion killer. The third option is a brief. This is ok for blue on the attack. However red may feel cheated by a brief if they dont get into action and or lose out in the mission. The forth option is let radar and the game call out the action and squadrons conduct themselves. What do you (especially those willing to take pat) think. We are open to all ideas however keep them short and simple - no essays please. I look forward to reading your responses. Last edited by 5./JG27.Farber; 04-08-2012 at 01:53 AM. |
#2
|
|||
|
|||
![]() Quote:
Code:
if ("EnterAreaM8".Equals(shortName)) { int i = 0; AiActor actor = GamePlay.gpActorByName("0:BoB_LW_JG51_III.000"); (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "Enemy_planes"); Timeout(i += 2, () => { (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "In_square"); }); Timeout(i += 2, () => { (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "M"); }); Timeout(i += 2, () => { (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "n8"); }); GamePlay.gpGetTrigger(shortName).Enable = false; } |
#3
|
|||
|
|||
![]()
Could a trigger have a chance of success? Or is it like a switch - on/off. Can a message in chat be sent to a specific Squadron or just one team?
|
#4
|
|||
|
|||
![]()
triggers can be made to do 'random' things
Code:
// Script that triggered an accidental damage to the player plane // Autor: FG28_Kodiak using System; using maddox.game; using maddox.game.world; public class Mission : maddox.game.AMission { AiAircraft PlayerPlane; public override void OnTrigger(int missionNumber, string shortName, bool active) { if (("trigger01".Equals(shortName) || "trigger02".Equals(shortName)) && active) { DoDamage(); } GamePlay.gpGetTrigger(shortName).Enable = false; } private void DoDamage() { PlayerPlane = (AiAircraft)GamePlay.gpPlayer().Place(); Random RandomIncident = new Random(); switch (RandomIncident.Next(1,9)) { case 1: PlayerPlane.hitNamed(part.NamedDamageTypes.ControlsElevatorDisabled); GamePlay.gpHUDLogCenter("Elevator Disabled"); break; case 2: PlayerPlane.hitNamed(part.NamedDamageTypes.ControlsAileronsDisabled); GamePlay.gpHUDLogCenter("Ailerons Disabled"); break; case 3: PlayerPlane.hitNamed(part.NamedDamageTypes.ControlsRudderDisabled); GamePlay.gpHUDLogCenter("Rudder Disabled"); break; case 4: PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0PropBlade0Broken); GamePlay.gpHUDLogCenter("PropBlade Broken"); break; case 5: PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0TotalFailure); GamePlay.gpHUDLogCenter("Engine Failure"); break; case 6: PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0OilSecondariesFire); GamePlay.gpHUDLogCenter("Oil is on fire"); break; case 7: PlayerPlane.hitNamed(part.NamedDamageTypes.HydraulicsPumpFailure); GamePlay.gpHUDLogCenter("Hydraulics Pump failure"); break; case 8: PlayerPlane.hitNamed(part.NamedDamageTypes.UndercarriageDownLockFailureL); GamePlay.gpHUDLogCenter("UndercarriageDownLock Left failure"); break; case 9: PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0Plug00Failure); PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0Plug01Failure); PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0Plug05Failure); GamePlay.gpHUDLogCenter("Engine Plug 0,1,5 failure"); break; } } public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft) { GamePlay.gpHUDLogCenter("Excellent!"); } public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) { GamePlay.gpHUDLogCenter("Congratulation You are alive ;-)"); } } ![]() |
#5
|
|||
|
|||
![]()
The best would be IMHO to react on Radar messages. However I didn't find a way so far to react on them in the script.
|
#6
|
||||
|
||||
![]()
I think the main problem with radar is that it tells the RAF the type. In reality FC RDF plotters would only be able to give location, height, heading and approximate numbers eg.
"30 plus, 10 miles North of Calais at Angels 12, Heading 300" Ground control (who the flight lead was in contact with) would give a vector and height for interception. This often took the form of a normal conversation when single pilots were sent to intercept single enemies. eg. "climb to 10,000ft, heading south-south west, you should see him on your 2 o'clock by now" So what would be immense is to have the script loop the list to find all RAF flight leads (which have at least a single wingman) and then load a custom menu for that pilot. The custom menu would have a ground control option to locate the enemy and firing it would give him a height, position, heading and number in the chat, vocally or on the orange HUD. Since this would be by request to that flight leader only then I don't see a problem with that. It is then up to him to direct his squadron to the enemy. It is possible to create a menu, to get the enemy, to get the flight position of the pilot. I would code this but I'm shite at it, I have the idea but not the technical ability ![]() I'm not a fan of randomness, RDF was excellent and pretty much directed the RAF into position - there are hundreds of accounts from both sides about this. I only just read about how Brian Kingcombe would scramble away inland from the enemy who were 15kft, he'd climb to 20kft, turn around and shallow dive south to meet them at speed. Anyway, replication would be ace. |
#7
|
|||
|
|||
![]()
An other way to get the Enemy location via script.
In this script i check the distance between red Airgroups and blue Airgroups. And if it lower as a given value, there will a Voice Message being generated to the ally Airgroups which are in range to the enemy. The script is not fully tested yet, i am to busy at the moment (home renovation ![]() Code:
using System; using System.Collections; using System.Collections.Generic; using maddox.game; using maddox.game.world; using maddox.GP; public class Mission : AMission { public void sendMessagesToAirgroup(AiAirGroup from, double maxDistance) { AiAirGroup[] EnemyAirgroups; Point3d StartPos = new Point3d(from.Pos().x, from.Pos().y, 1.0); EnemyAirgroups = GamePlay.gpAirGroups((from.Army() == 1) ? 2 : 1); int i = 0; foreach (AiAirGroup aag in EnemyAirgroups) { Point3d enemyPosition = new Point3d(aag.Pos().x, aag.Pos().y, 1.0); if (from.Pos().distance(ref enemyPosition) < maxDistance) { string sectorName = GamePlay.gpSectorName(aag.Pos().x, aag.Pos().y); string[] splittet = sectorName.Split(','); string alpha = splittet[0]; string number = "n" + splittet[1]; AiAircraft LeaderPlane = (from.GetItems()[0] as AiAircraft); Timeout(i, () => { (LeaderPlane as AiAircraft).SayToGroup(from as AiAirGroup, "Enemy_planes"); }); Timeout(i += 2, () => { LeaderPlane.SayToGroup(from, "In_square"); }); Timeout(i += 2, () => { LeaderPlane.SayToGroup(from, alpha); }); Timeout(i += 2, () => { LeaderPlane.SayToGroup(from, number); }); i += 2; } } } public override void OnTickGame() { base.OnTickGame(); if (Time.tickCounter() % 600 == 299) { foreach(AiAirGroup aag in GamePlay.gpAirGroups(1)) sendMessagesToAirgroup(aag, 100000.0); } } } Last edited by FG28_Kodiak; 04-08-2012 at 02:15 PM. |
#8
|
|||
|
|||
![]()
That looks interesting, Kodiak. Do I just copy that script over existing one? Do I need any extra functions to invoke messages? Where do I edit distaff value between Airgroups? .... If You answer I will test it as soon as possible...
__________________
![]() Asus P6T V2 Deluxe, I7 930, 3x2 GB RAM XMS3 Corsair1333 Mhz, Nvidia Leadtek GTX 470, Acer 1260p screen projector, Track IR 4 OS ver5, Saitek Pro Flight Rudder, Saitek X52, Win 7 x64 ultimate |
#9
|
|||
|
|||
![]()
Only copy the sendMessagesToAirgroup to your code, in OnTickGame you will see the example how to use it
sendMessagesToAirgroup(aag, 100000.0); bold is the distance. |
#10
|
|||
|
|||
![]()
Some more radar speech code that might be useful. I use sayMessageTo to voice to everyone in the army, not just the airgroup, and have converted altitude to use 'angels' & 'metres' (depending on the army) with custom functions.
Interestingly, both (actor as AiAircraft).getParameter(part.ParameterTypes.Z_Alt itudeMSL, -1); and (actor as AiAircraft).getParameter(part.ParameterTypes.Z_Alt itudeAGL, -1); both fail to get the airgroup altitude in a multi-player server environment, so you need to use the Pos().z & convert the z offset to metres. Code removed by author
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash. Get the latest COD Team Fusion patch info HERE Last edited by salmo; 01-12-2013 at 01:07 PM. |
![]() |
|
|