View Single Post
  #2  
Old 01-01-2012, 12:59 PM
41Sqn_Banks 41Sqn_Banks is offline
Approved Member
 
Join Date: Oct 2007
Posts: 644
Default

If you want to access the information by reading the mission file (i.e. before the mission was loaded) you can use some parts of IL2DCE.

The AirGroupWaypoint class allows access to the all parameters of one waypoint.
http://code.google.com/p/il2dce/sour...oupWaypoint.cs

To build a list of all waypoints of one air group you need to use this code:
Code:
// Waypoints
string Id = "AirGroupKey.SquadronIndexAndFlightMask";
List<AirGroupWaypoint>() Waypoints = new List<AirGroupWaypoint>();
for (int i = 0; i < sectionFile.lines(Id + "_Way"); i++)
{
    AirGroupWaypoint waypoint = new AirGroupWaypoint(sectionFile, Id, i);
    Waypoints.Add(waypoint);
}
Where the Id is the in a format of "BoB_LW_LG1_IV.37" so you need to remove the last digit that identifies the aircraft from the "Player" key of the [MAIN] section.

If you want to access further information from the air group you can also use the AirGroup class. http://code.google.com/p/il2dce/sour...CE/AirGroup.cs
However it has many dependencies that would have to be removed.

Hope it's understandable.
Reply With Quote