![]() |
|
|
|
#1
|
|||
|
|||
|
Even if it is not written duing the mission, MG must have at least some pointer to the filebuffer in which is stored.. Most probably they should also have some LastLineAdded funtion.. You should ask Narvy on sukhoi forum.
|
|
#2
|
|||
|
|||
|
I managed to register a method to the Chat event of the GameDef class. However I don't think it's possible to access GameDef from the mission script.
I can do this however from within my addin. |
|
#3
|
|||
|
|||
|
Quote:
I see you implemented an Add-In interface in your campaign stuff Banks - does that also run while a mission is being played, i.e. I could hook into the Chat event while a mission is playing if I write an Add-in? Thanks for your comments/help btw |
|
#4
|
|||
|
|||
|
Yes the chat is captured during the mission.
http://code.google.com/p/il2dce/sour...IL2DCE/Core.cs Code:
public Core(GameDef game)
{
_game = game;
Game.EventChat += new GameDef.Chat(Game_EventChat);
Code:
void Game_EventChat(IPlayer from, string msg)
{
if(msg.Contains("!hello"))
{
Game.gpLogServer(new Player[] { from }, "Hello World!", null);
}
}
http://code.google.com/p/il2dce/sour.../GameSingle.cs Code:
public GameSingle(GameSingleIterface game)
: base(game)
{
core = new Core(this);
}
http://code.google.com/p/il2dce/sour...GameSingle.xml |
|
#5
|
|||
|
|||
|
Great - thank you!
|
|
#6
|
|||
|
|||
|
One related question to this is has anyone found out anything regarding an Add-in interface that works without having to define a single player mission or campaign setup pages?
Banks - it seems the GameDef reference is only passed down into the Add-In once a whole campaign set is defined, say a new 'Single Player' menu entry (i.e. an entry in the XML config to the right assembly etc). So if I wanted to let people just use my add-in then I have to either: - Define some custom pages to go pick quick missions that exist. Is there anyway to reuse what's been defined in Play.QuickMiss() as that seems to return ContentControls rather than a Page implementation? - Define a complete WPF custom page that allows a mission file to be picked and then loads the Mission? - Some other type of Client Add-In that gives me the GameDef reference but is included in all type so Campaign/Missions? Anyone got any ideas of this? Last edited by fearlessfrog; 08-14-2011 at 09:38 PM. |
|
#7
|
|||
|
|||
|
Quote:
Code:
Game.gameInterface.PagePush(Game.gameInterface.PageGet("SingleMissGame"), "mission " + missionFileName);
By this you should be able to get the stock pages fpr single mission selection or the quick mission. Try the name of the corresponding ContentControl, so far this worked for me. Quote:
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|