View Single Post
  #3  
Old 08-01-2011, 04:41 PM
adonys adonys is offline
Approved Member
 
Join Date: Apr 2010
Posts: 850
Default

there are two ways to do it atm:

1) this is the new one (haven't tested it yet)

Code:
//$reference parts/MissionTools/MissionTools.dll
using nsMissionTools;

mt = new MissionTools();
mt.MissionToolsInit(GamePlay, Time);
2) the old one (used by TEF in his server tool)

Code:
using nsMissionTools;

LoadDll();
mt = new MissionTools();
mt.MissionToolsInit(GamePlay, Time);

private void LoadDll() {
    try {
      //Load the new DLL from the specified path and set the current method to popCommand().
      Assembly a = null;
      a = Assembly.LoadFrom(Directory.GetCurrentDirectory() + @"\IL2ServerMasterLibrary.dll");
    }
    catch (Exception e) {
      GamePlay.gpLogServer(new Player[] { GamePlay.gpPlayer() }, "ERR: Could not load MisionTools library!", null);
    }
  }
I also intend to add all the MP needed functions (to clean unused AIs, etc.)

Then I intend to release it for everyone, and use it to create a Dynamic Campaign Generator.

BTW, do you know any method to reference an AiActor from an AiAircraft (a simple one, not searching through all AiActors to find the one being that specific AiAircraft)? You can d it the other way around using (AiAircraft) AiActor or AiActor as AiAircraft, but how can I reverse this? I've asked naryv, but he hasn't responded yet..

Last edited by adonys; 08-01-2011 at 04:45 PM.
Reply With Quote