![]() |
|
|
|
#1
|
|||
|
|||
|
Have any of you guys played around with trying to have some sort of input into a running mission script, i.e. user key-presses or external window handle?
I'm thinking as a WPF app it should be possible to register for OnKey events or GetKeyState and the like but I've not yet tried it. It should be possible to get the window handle and then go from there as I imagine the AMission class wouldn't get any of that naturally. Anyone tried this or have any luck with this type of thing already? |
|
#2
|
|||
|
|||
|
I tried to read "command" (something like "!hello" typed in by a player) from the log file. However it seems like the log file is only written when the game is closed.
|
|
#3
|
|||
|
|||
|
As far as I know a log file is written with a very short delay at least on a dedi server.
Small_Bee or Geniok at sukhoi.ru mentioned that grabbing key presses is probably possible if a dll is downloaded from server to client together with a mission. No one did this yet as far as i know. Last edited by Ataros; 08-08-2011 at 08:45 AM. |
|
#4
|
|||
|
|||
|
Ok I will check this. Would make sense as the dedicated server is not supposed to be closed that often.
|
|
#5
|
|||
|
|||
|
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.
|
|
#6
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|