Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-08-2012, 01:02 PM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

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.
Reply With Quote
  #2  
Old 04-08-2012, 03:07 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

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 ). Feel free to expand it, the voice files (use the filename without .ogg) are located in ..\Steam\SteamApps\common\il-2 sturmovik cliffs of dover\parts\bob\speech, you can add for example the type of the Enemy Aircrafts, their Numbers etc. The timedelay between the checks should be larger as in my example to avoid overlaping of the messages.


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 03:15 PM.
Reply With Quote
  #3  
Old 04-08-2012, 03:53 PM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

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
Reply With Quote
  #4  
Old 04-08-2012, 03:56 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

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.
Reply With Quote
  #5  
Old 04-08-2012, 03:59 PM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

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 02:07 PM.
Reply With Quote
  #6  
Old 04-08-2012, 04:19 PM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

Now this stuff looks very promising.

I'm going to crack open VS express and have a bigger look. I can't write the stuff but adapting it may be easier.
Reply With Quote
  #7  
Old 04-08-2012, 05:36 PM
5./JG27.Farber 5./JG27.Farber is offline
Approved Member
 
Join Date: Aug 2011
Posts: 1,958
Default

Kodiak thats great. Were gonna give it a whirl on our server today. I have some ideas for expansion. Could there be some kind of delay between requesting the information and recieving it, say 4 mins? This would simulate the request going to and from the lines of communication. Also. What if some radars are knocked out or damaged? Can this be simulated also?

P.S. I know how you feel with the renovation, Ive been doing it for 4 months now. It will be finished this week. What a grind.
Reply With Quote
  #8  
Old 04-08-2012, 07:00 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

you wanna ask the operators with the mission menu? and than after 4min you will get the response? This is possible without problem.
Okay for clearance, when we use "radars" will you give the messages to the Airgroups in range of a spezific radarstation or to all. So if you hit the 'radarbutton' then you get Information of all Enemies Airgoups in range of any available radarstation or only from this you are in Range?
Reply With Quote
  #9  
Old 04-08-2012, 07:40 PM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

i gave it a go : this is my script

PHP Code:
//$reference IL2ClodCommanderStats.dll
// v.1_0. script by FG28_Kodiak, ZaltysZ, Oreva, Small_Bee, RAF238thWildWillie
using System;
using System.Diagnostics;
using System.Collections;
using maddox.GP;
using maddox.game;
using maddox.game.world;
using part;
using System.Collections.Generic;
using IL2ClodCommanderStats;


public class 
Mission AMission
{
    
#region Stats Initialization
    // For Connection to the IL2 Clod Commander Application
    // This allows you to store stats on players within Cliffs of Dover
    //  Change the following to meet your needs
    //
    
private static string serverName "5./JG27 SERVER";
    private static 
string serverIP "127.0.0.1";
    
    
// Password is not used currently
    
private static string serverPassword "password";
    private static 
Int32  serverPort 27015;
    private 
StatsRecording stats = new StatsRecording(serverNameserverIPserverPasswordserverPort);
    private 
Dictionary<StringAiActorallActors = new Dictionary<StringAiActor>();
    private List<
ServerCommandnewCmds = new List<ServerCommand>();
    private 
Stopwatch MissionTimer = new Stopwatch();
    
#endregion

    
int LastMissionLoaded 0;

    
double initTime;
    
    
    
////////////////setting chat messages
    
private void sendChatMessage(string msgparams object[] args)
    {
        
GamePlay.gpLogServer(nullmsgargs);
    }


    private 
void sendChatMessage(Player playerstring msgparams object[] args)
    {
        if (
player != null)
            
GamePlay.gpLogServer(new Player[] { player }, msgargs);
    }


    private 
void sendChatMessage(int armystring msgparams object[] args)
    {
        List<
PlayerConsignees = new List<Player>();

        if (
GamePlay.gpPlayer() != null)
            
Consignees.Add(GamePlay.gpPlayer());
        if (
GamePlay.gpRemotePlayers() != null)
            
Consignees.AddRange(GamePlay.gpRemotePlayers());

        if (
army == -1)
            
GamePlay.gpLogServer(nullmsgargs);
        else if (
Consignees.Exists(item => item.Army() == army))
            
GamePlay.gpLogServer(Consignees.FindAll(item => item.Army() == army).ToArray(), msgargs);
    }
    
////////////////testing voice messages
    
     
public void sendMessagesToAirgroup(AiAirGroup fromdouble maxDistance)
    {

        
AiAirGroup[] EnemyAirgroups;
        
Point3d StartPos = new Point3d(from.Pos().xfrom.Pos().y1.0);

        
EnemyAirgroups GamePlay.gpAirGroups((from.Army() == 1) ? 1);

        
int i 0;

        foreach (
AiAirGroup aag in EnemyAirgroups)
        {
            
Point3d enemyPosition = new Point3d(aag.Pos().xaag.Pos().y1.0);

            if (
from.Pos().distance(ref enemyPosition) < maxDistance)
            {
                
                
string sectorName GamePlay.gpSectorName(aag.Pos().xaag.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(+= 2, () =>
                {
                    
LeaderPlane.SayToGroup(from"In_square");
                });

                
Timeout(+= 2, () =>
                {
                    
LeaderPlane.SayToGroup(fromalpha);
                });
                
Timeout(+= 2, () =>
                {
                    
LeaderPlane.SayToGroup(fromnumber);
                });

                
+= 2;
            }
        }
    }


    public 
override void OnTickGame()
    {
        
base.OnTickGame();

        if (
Time.tickCounter() % 600 == 299)
        {
            foreach(
AiAirGroup aag in GamePlay.gpAirGroups(1))
                
sendMessagesToAirgroup(aag100000.0);
        
        }
    


    
// loading sub-missions
    
    
          #region Stats Timer
          
if (MissionTimer.Elapsed.TotalSeconds >= 5// 5 seconds
        
{
            
MissionTimer.Restart(); // stopwatch reset to 0 and restart
            
if (stats != null )
            {
               
newCmds stats.getCommands();
               if (
newCmds != null && newCmds.Count 0)
                   
ProcessCommands(newCmds);
            }
        }
        
#endregion
    ///////////////////////
    // server info every 5 min
    
     
if (Time.tickCounter() % 9000 == 1800)  
       
       {

       
sendChatMessage((-1), "PLEAS VISIT www.5jg27.net TO CHECK STATS");

        }
    
    
    
// load ground objects
       
if (Time.tickCounter() % 2592000 == 300)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_ground.mis");
    
       }

// loads Mission1
       
if (Time.tickCounter() % 2592000 == 12600)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Air1Red1Blue1.mis");
                      
       }

// loads Rescue
       
if (Time.tickCounter() % 2592000 == 95000)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Airsearescue.mis");
                      
       }
    

// loads Mission2
       
if (Time.tickCounter() % 2592000 == 66600)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Air2Red2.mis");
           
           
       }

// loads Mission3
       
if (Time.tickCounter() % 2592000 == 144000)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Air3Blue2.mis");
          
           
       }
       


    }
 
////////////////////////////////////////////////////////////////////////////////////////////////////

//

// Base Scripts for Missions
  
private bool isAiControlledPlane (AiAircraft aircraft
  {
        if (
aircraft == null
        { 
            return 
false;
        }

        
Player [] players GamePlay.gpRemotePlayers ();
        foreach (
Player p in players
        {    
            if (
!= null && (p.Place () is AiAircraft) && (p.Place () as AiAircraft) == aircraft)
            { 
                return 
false;
            }
        }

        return 
true;
    }

    private 
void destroyPlane (AiAircraft aircraft) {
        if (
aircraft != null) { 
            
aircraft.Destroy ();
        }
    }

    private 
void explodeFuelTank (AiAircraft aircraft
  {
        if (
aircraft != null
        { 
            
aircraft.hitNamed (part.NamedDamageTypes.FuelTank0Exploded);
        }
    }

    private 
void destroyAiControlledPlane (AiAircraft aircraft) {
        if (
isAiControlledPlane (aircraft)) {
            
destroyPlane (aircraft);
        }
    }

    private 
void damageAiControlledPlane (AiActor actor) {
        if (
actor == null || !(actor is AiAircraft)) { 
            return;
        }

        
AiAircraft aircraft = (actor as AiAircraft);

        if (!
isAiControlledPlane (aircraft)) {
            return;
        }

        if (
aircraft == null) { 
            return;
        }

        
aircraft.hitNamed (part.NamedDamageTypes.ControlsElevatorDisabled);
        
aircraft.hitNamed (part.NamedDamageTypes.ControlsAileronsDisabled);
        
aircraft.hitNamed (part.NamedDamageTypes.ControlsRudderDisabled);
        
aircraft.hitNamed (part.NamedDamageTypes.FuelPumpFailure);

        
int iNumOfEngines = (aircraft.Group() as AiAirGroup).aircraftEnginesNum();
        for (
int i 0iNumOfEnginesi++)
        {
            
aircraft.hitNamed((part.NamedDamageTypes)Enum.Parse(typeof(part.NamedDamageTypes), "Eng" i.ToString() + "TotalFailure"));
        }

        
/***Timeout (240, () =>
                {explodeFuelTank (aircraft);}
            );
         * ***/

        
Timeout (300, () =>
                {
destroyPlane (aircraft);}
            );
    }

  public 
override void Init(maddox.game.ABattle battleint missionNumber)
  {
        
base.Init(battlemissionNumber);
        
MissionNumberListener = -1//Listen to events of every mission
  
}

//////////////////////////////////////////
// Methods for Stats (You can add any code you may need after the Stats Region
//////////////////////////////////////////

    
public override void OnBattleStarted()
    {
        
base.OnBattleStarted();
        
#region Stats
           
MissionTimer.Start(); // start the stopwatch
        #endregion
    
}

    private 
void sendScreenMessageTo(int armystring msgobject[] parms)
    {
        List<
PlayerPlayers = new List<Player>();

        
// on Dedi the server or for singleplayertesting
        
if (GamePlay.gpPlayer() != null)
        {
            if (
GamePlay.gpPlayer().Army() == army || army == -1)
                
Players.Add(GamePlay.gpPlayer());
        }
        if (
GamePlay.gpRemotePlayers() != null || GamePlay.gpRemotePlayers().Length 0)
        {
            foreach (
Player p in GamePlay.gpRemotePlayers())
            {
                if (
p.Army() == army || army == -1)
                    
Players.Add(p);
            }
        }
        if (
Players != null && Players.Count 0)
            
GamePlay.gpHUDLogCenter(Players.ToArray(), msgparms);
    }

    private 
void ProcessCommands(List<ServerCommandnewCmds)
    {
        try
        {
            foreach (
ServerCommand sc in newCmds)
            {
                if (
sc.CommandType.Equals("HUDmsg"))
                {
                    if (
sc.ToWho.Equals("All"))
                        
GamePlay.gpHUDLogCenter(sc.Command);
                  else if (
sc.ToWho.Equals("Red"))
                    {
                        
sendScreenMessageTo(1sc.Commandnull);
                    }
                    else if (
sc.ToWho.Equals("Blue"))
                    {
                        
sendScreenMessageTo(2sc.Commandnull);
                    }
                    else
                    {
                        if (
GamePlay.gpRemotePlayers() != null || GamePlay.gpRemotePlayers().Length 0)
                        {

                            foreach (
Player p in GamePlay.gpRemotePlayers())
                            {
                                if (
p.Name() == sc.ToWho)
                                    
GamePlay.gpLogServer(new Player[] { }, sc.Commandnull);
                            }
                        }
                        
// Message is for a specific player based on player name in string sc.ToWho
                    
}
                }
            }
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.ProcessCommands - Exception: " ex);
        }
    }
 
    public 
override void OnActorCreated(int missionNumberstring shortNameAiActor actor)
    {
        
#region stats
        
base.OnActorCreated(missionNumbershortNameactor);
        
// Add actor to list of all Actors
        
if (!allActors.ContainsKey(shortName))
           
allActors.Add(shortNameactor);
        try
        {
            
stats.newActor(shortNameactor);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorCreated - Exception: " ex);
        }
        
#endregion
    
}


    public 
override void OnPersonHealth(maddox.game.world.AiPerson personmaddox.game.world.AiDamageInitiator initiatorfloat deltaHealth)
    {
        
#region stats
        
base.OnPersonHealth(personinitiatordeltaHealth);
        try
        {
            
stats.playerHealth(personinitiatordeltaHealth);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPersonHealth - Exception: " ex);
        }
        
#endregion

    
}

    public 
override void OnPersonParachuteFailed(maddox.game.world.AiPerson person)
    {
        
#region stats
        
base.OnPersonParachuteFailed(person);
        try
        {
            
stats.personParachute("Failed"person);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPersonParachuteFailed - Exception: " ex);
        }
        
#endregion
    
}

    public 
override void OnPersonParachuteLanded(maddox.game.world.AiPerson person)
    {
        
#region stats
        
base.OnPersonParachuteLanded(person);
        try
        {
            
stats.personParachute("Landed"person);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPersonParachuteLanded - Exception: " ex);
        }
        
#endregion
    
}

    public 
override void OnPlayerArmy(maddox.game.Player playerint army)
    {
        
#region stats
        
base.OnPlayerArmy(playerarmy);
        try
        {
            
stats.playerArmy(playerarmy);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlayerArmy - Exception: " ex);
        }
        
#endregion

    
}

    public 
override void OnPlayerConnected(maddox.game.Player player)
    {
        
#region stats
        
base.OnPlayerConnected(player);
        try
        {
            
stats.pilotInfo(player);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlayerConnected - Exception: " ex);
        }

        
#endregion
        // Your code here
    
}
    public 
override void OnPlayerDisconnected(maddox.game.Player playerstring diagnostic)
    {
        
#region stats
        
base.OnPlayerDisconnected(playerdiagnostic);
        try
        {
            
stats.playerDisconnect(playerdiagnostic);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlayerDisconnected - Exception: " ex);
        }

        
#endregion
        // Your code here
    
}
    
    public 
override void OnPlaceEnter(Player playerAiActor actorint placeIndex)
    {
        
#region stats
        
base.OnPlaceEnter(playeractorplaceIndex);
        try
        {
            
Point2d actorPos = new Point2d(actor.Pos().xactor.Pos().y);
            
String startingGrid GamePlay.gpSectorName(actorPos.xactorPos.y).ToString();
            
stats.sortieBegin(playeractorplaceIndexactorPosstartingGrid);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlaceEnter - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}


    public 
override void OnPlaceLeave(Player playerAiActor actorint placeIndex)
    {
        
#region stats
        
base.OnPlaceLeave(playeractorplaceIndex);
        try
        {
            
stats.sortieEnd(playeractorplaceIndex);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlaceLeave - Exception: " ex);
        }

        
#endregion
        //add your code here
        
Timeout(1, () =>
                { 
damageAiControlledPlane(actor); }
            );
    }

    public 
override void OnAircraftCrashLanded (int missionNumberstring shortNameAiAircraft aircraft)
    {
        
#region stats
        
base.OnAircraftCrashLanded (missionNumbershortNameaircraft);
        try
        {
            
Point2d actorPos = new Point2d(aircraft.Pos().xaircraft.Pos().y);
            
String gridRef GamePlay.gpSectorName(actorPos.xactorPos.y).ToString();
            
stats.aircraftLanded("CrashLanded"shortNameaircraftactorPosgridRef);
            
System.Console.WriteLine("Stats.OnAircraftCrashLanded - ("+shortName+")");
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftCrashLanded - Exception: " ex);
        }
        
#endregion
        //add your code here
        
Timeout (300, () =>
            { 
destroyPlane(aircraft); }
            );
      }

    public 
override void OnAircraftTookOff(int missionNumberstring shortNameAiAircraft aircraft)
    {
        
#region stats
        
base.OnAircraftTookOff(missionNumbershortNameaircraft);
        try
        {
            
stats.aircraftTakeoff(shortNameaircraft);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftTookOff - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}
          
    public 
override void OnAircraftLanded (int missionNumberstring shortNameAiAircraft aircraft)
    {
          
#region stats
          
base.OnAircraftLanded(missionNumbershortNameaircraft);
            try
            {
              
Point2d actorPos = new Point2d(aircraft.Pos().xaircraft.Pos().y);
             
String gridRef GamePlay.gpSectorName(actorPos.xactorPos.y).ToString();
             
stats.aircraftLanded("Landed"shortNameaircraftactorPosgridRef);
            }
            catch (
Exception ex)
            {
            
System.Console.WriteLine("Stats.OnAircraftTookOff - Exception: " ex);
            }
          
#endregion
          //add your code here

          
Timeout(300, () =>
            { 
destroyPlane(aircraft); }
            );
    }

    public 
override void OnActorDamaged(int missionNumberstring shortNameAiActor actorAiDamageInitiator initiatorNamedDamageTypes damageType)
    {
        
#region stats
        
base.OnActorDamaged(missionNumbershortNameactorinitiatordamageType);
        try
        {
            
stats.missionActorDamaged(shortNameactorinitiatordamageType);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorDamaged - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}

    public 
override void OnAircraftDamaged(int missionNumberstring shortNameAiAircraft aircraftAiDamageInitiator initiatorNamedDamageTypes damageType)
    {
        
#region stats
        
base.OnAircraftDamaged(missionNumbershortNameaircraftinitiatordamageType);
        try
        {
            
stats.missionAircraftDamaged(shortNameaircraftinitiatordamageType);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftDamaged - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}
    public 
override void OnAircraftLimbDamaged(int missionNumberstring shortNameAiAircraft aircraftAiLimbDamage limbDamage)
    {
        
#region stats
        
base.OnAircraftLimbDamaged(missionNumbershortNameaircraftlimbDamage);
        try
        {
            
stats.aircraftLimbDamaged(shortNameaircraftlimbDamage);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftLimbDamaged - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}
    public 
override void OnAircraftCutLimb(int missionNumberstring shortNameAiAircraft aircraftAiDamageInitiator initiatorLimbNames limbName)
    {
        
#region stats
        
base.OnAircraftCutLimb(missionNumbershortNameaircraftinitiatorlimbName);
        try
        {
            
stats.missionAircraftCutLimb(shortNameaircraftinitiatorlimbName);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftCutLimb - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}

    public 
override void OnActorDead(int missionNumberstring shortNameAiActor actor, List<DamagerScoredamages)
    {
        
#region stats
        
base.OnActorDead(missionNumbershortNameactordamages);
        try
        {
             
stats.missionActorDead(shortNameactordamages); 
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorDead - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}

    public 
override void OnActorDestroyed(int missionNumberstring shortNameAiActor actor)
    {
        
#region stats
        
base.OnActorDestroyed(missionNumbershortNameactor);
        try
        {
            
stats.actorDestroyed(shortNameactor);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorDestroyed - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}
    public 
override void OnAircraftKilled(int missionNumberstring shortNameAiAircraft aircraft)
    {
        
#region stats
        
base.OnAircraftKilled(missionNumbershortNameaircraft);
        try
        {
            
stats.aircraftKilled(shortNameaircraft);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftKilled - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}

    public 
override void OnBattleStoped()
    {
        
#region stats
        
base.OnBattleStoped();
        try
        {
            
stats.battleStopped();
            
// Loop through list of AiActors and destroy them all
            
List<stringkeys = new List<string>(allActors.Keys);
            for (
int i 0keys.Counti++)
            {
                
AiActor a allActors[keys[i]];
                
AiAircraft aircraft as AiAircraft;
                if (
aircraft != null)
                {
                    
aircraft.Destroy();
                }
                else
                {
                    
AiGroundActor aiGroundActor as AiGroundActor;
                    if (
aiGroundActor != null)
                    {
                        
aiGroundActor.Destroy();
                    }
                    else
                    {
                        
System.Console.WriteLine("Stats.OnBattleStoped - Unknown Actor (" a.Name()+") ShortName ("+keys[i]+")");
                    }
                }
            }
            
stats.disconnectStats();
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnBattleStoped - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}
//////////////////////////////////////////////////////////////////////////////////////////////////


 

console gives that every 20-30sec

PHP Code:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsgIMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageDatamsgDataInt32 type)
at maddox.game.IBattle.OnTickGame()
at maddox.game.GameDef.tickGame()
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.Hwe9ADXhn0AxpFMw7lv0(Object )
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.8An9qLaqwNd()
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.Af3oASrUh27g1Z9hCmya(Object )
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.9B8JM8x755B(Boolean Boolean )
=================================================
=================================================
System.NullReferenceExceptionObject reference not set to an instance of an object.
Server stack trace:
at Mission.sendMessagesToAirgroup(AiAirGroup fromDouble maxDistance)
at Mission.OnTickGame()
at maddox.game.ABattle.OnTickGame()
at maddox.game.world.Strategy.OnTickGame()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr mdObject[] argsObject serverInt32 methodPtrBoolean fExecuteInContextObject[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msgInt32 methodPtrBoolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsgIMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageDatamsgDataInt32 type)
at maddox.game.IBattle.OnTickGame()
at maddox.game.GameDef.tickGame()
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.Hwe9ADXhn0AxpFMw7lv0(Object )
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.8An9qLaqwNd()
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.Af3oASrUh27g1Z9hCmya(Object )
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.9B8JM8x755B(Boolean Boolean )
================================================= 
is that because there is no airgroups loaded yet?
__________________

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
Reply With Quote
  #10  
Old 04-09-2012, 12:26 AM
5./JG27.Farber 5./JG27.Farber is offline
Approved Member
 
Join Date: Aug 2011
Posts: 1,958
Default

Quote:
Originally Posted by FG28_Kodiak View Post
you wanna ask the operators with the mission menu? and than after 4min you will get the response? This is possible without problem.
Okay for clearance, when we use "radars" will you give the messages to the Airgroups in range of a spezific radarstation or to all. So if you hit the 'radarbutton' then you get Information of all Enemies Airgoups in range of any available radarstation or only from this you are in Range?
Hmm if the radar closest gave the information that would be good otherwise it is as if the aircraft has the radar, or maybe not?

How would you ask the radar?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.