![]() |
#1
|
|||
|
|||
![]()
Attached is a list of parameters that can be inquired by a script from the CloD engine as in the following example:
float health = (float)aircraft.getParameter(part.ParameterTypes.M _Health, -1); This allows creation of instruments panels on external monitors, virtual cockpits, etc. Sample from naryv for offline use (prints out TAS and alt) Code:
using maddox.game; using maddox.game.world; public class Mission : AMission { System.IO.FileInfo fi = new System.IO.FileInfo("indicators.txt"); System.IO.StreamWriter sw; public override void OnTickGame() { base.OnTickGame(); if (Time.tickCounter() % 30 == 1) // tick ~ 1/30 second, 30 ticks ~ 1 second { AiAircraft curPlane = GamePlay.gpPlayer().Place() as AiAircraft; // get player aircraft if (curPlane != null) { double i_IAS = curPlane.getParameter(part.ParameterTypes.I_VelocityIAS, -1); // get TAS and alt. double i_IAlt = curPlane.getParameter(part.ParameterTypes.I_Altitude, -1); System.Console.WriteLine("IAS :{0}", i_IAS); // write to console System.Console.WriteLine("Alt :{0}", i_IAlt); sw = fi.AppendText(); // write to file sw.WriteLine("Time:{0}",Time.currentReal()); sw.WriteLine("IAS :{0}", i_IAS); sw.WriteLine("Alt :{0}", i_IAlt); sw.Close(); } } } } Last edited by Ataros; 10-05-2011 at 08:43 AM. |
#2
|
|||
|
|||
![]()
thanks for this- made life alot easier to see how they've done things- there's many more 'parameters' to play with than old IL2 devicelink- very extended
![]() i'm very new to this scripting lark but managed to get some bombsight parameters writing to screen ![]() this does lead me to think that if any efforts are to be made in this direction there is a decision to be made with the output, i feel, there being a choice with separate instrument gauge and model instant values available for some params- chart makers will want one set, instrument replicators wanting another set- or start from scratch with a new protocol. any thoughts? |
#3
|
|||
|
|||
![]()
Can this be used to create a speedbar like in IL2-1946? ie speed, altitude & heading?
__________________
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 |
#4
|
|||
|
|||
![]()
http://simhq.com/forum/ubbthreads.ph...ml#Post3347984
i;ve just changed a few things to read other params |
#5
|
|||
|
|||
![]()
Updated the 1st message with a sample from naryv.
|
#6
|
||||
|
||||
![]()
Great finding Ataros, now I've got the subject quite clear and I think with a litle bit of programming an interface it would be quite simple to make external gauges work, either in a second monitor or using phidgets I think.
![]() I'll start coding a little bit tonite to see what are exactly the possibilities that open up doing the things like this. Great news.
__________________
![]() StG111 2003-2005 | SG1 2006-2009 | 15.Span 2010-2011 CPU Intel i7 920 @ 2.67 -> OC 4 Ghz MB ASUS P6T Cooler Noctua NH-D14 Memory 12GB GPU 2x nVidia 285 GTX 1GB SLI HD 2x SATAII WD VelociRaptor 150GB RAID 0 SB ASUS Xonar DS/DT 7.1 PSU Tagan 1100W OS W7 Ult.64 LCD LG W2284F-PF TrackIR 3 Pro + Saitek X-52 + Saitek Pro Rudders Pedals + Pro Flight Throttle Quadrant + Saitek PcDash 2 Last edited by KeBrAnTo; 10-20-2011 at 11:05 AM. |
#7
|
||||
|
||||
![]()
Sorry, I think I've seen it in another of your posts Ataros, but I cannot find it now so could you please tell me which are the dll's containing the maddox.game namespace?
Thanks in advance.
__________________
![]() StG111 2003-2005 | SG1 2006-2009 | 15.Span 2010-2011 CPU Intel i7 920 @ 2.67 -> OC 4 Ghz MB ASUS P6T Cooler Noctua NH-D14 Memory 12GB GPU 2x nVidia 285 GTX 1GB SLI HD 2x SATAII WD VelociRaptor 150GB RAID 0 SB ASUS Xonar DS/DT 7.1 PSU Tagan 1100W OS W7 Ult.64 LCD LG W2284F-PF TrackIR 3 Pro + Saitek X-52 + Saitek Pro Rudders Pedals + Pro Flight Throttle Quadrant + Saitek PcDash 2 |
#8
|
|||
|
|||
![]()
Do you mean this post?
Quote:
|
#9
|
||||
|
||||
![]()
Yes, thanks mate
![]()
__________________
![]() StG111 2003-2005 | SG1 2006-2009 | 15.Span 2010-2011 CPU Intel i7 920 @ 2.67 -> OC 4 Ghz MB ASUS P6T Cooler Noctua NH-D14 Memory 12GB GPU 2x nVidia 285 GTX 1GB SLI HD 2x SATAII WD VelociRaptor 150GB RAID 0 SB ASUS Xonar DS/DT 7.1 PSU Tagan 1100W OS W7 Ult.64 LCD LG W2284F-PF TrackIR 3 Pro + Saitek X-52 + Saitek Pro Rudders Pedals + Pro Flight Throttle Quadrant + Saitek PcDash 2 |
#10
|
|||
|
|||
![]()
Hi,
which programming language is this and what how do I make CoD execute it ? EDIT: ok I got it. It's C#. But this works only for custom missions, right ? http://simhq.com/forum/ubbthreads.ph...3347984/2.html thanks, Tex Last edited by Tex-Twil; 01-18-2012 at 02:14 PM. |
![]() |
|
|