Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-28-2012, 05:34 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default Is I_MagneticCompass broken?

Can anyone tell me if the I_MagneticCompass paramater type has been broken? My script execution is stopping at this line without an error being thrown, which is very puzzling. Oh, and the aircraft is not null & is an AiAircraft.

Code:
if (aircraft != null && aircraft is AiAircraft)
{
    Console.WriteLine("This line executes OK");
    double heading = aircraft.getParameter(part.ParameterTypes.I_MagneticCompass, 0);
    Console.WriteLine("This line fails to execute");
}
__________________
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

Last edited by salmo; 11-28-2012 at 07:42 AM.
Reply With Quote
  #2  
Old 11-28-2012, 03:43 PM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

Hi Salmo, long time no speak (since USL days!)

We need to be talking to you mate, I believe Farber PM'd you, but you also contacted Moggel. Perhaps at SOW campaign time?

Cheers bud
Reply With Quote
  #3  
Old 11-28-2012, 05:36 PM
theOden theOden is offline
Approved Member
 
Join Date: May 2011
Location: Sweden
Posts: 221
Default

I'd say it's very much broken.

trying this:
Quote:

AiAircraft aircraft = actor as AiAircraft;
if (aircraft != null && aircraft is AiAircraft)
{
double Z_AmbientAirTemperature = aircraft.getParameter(part.ParameterTypes.Z_Ambien tAirTemperature, -1);
GamePlay.gpLogServer(null, "aircraft heading: {0}", new object[] { Z_AmbientAirTemperature.ToString("0.00") });
double I_MagneticCompass = aircraft.getParameter(part.ParameterTypes.I_Magnet icCompass, 0);
GamePlay.gpLogServer(null, "aircraft heading: {0}", new object[] { I_MagneticCompass.ToString("0.0") });
};
will leave me with correct ambient temp and then a huge error on server console.
I guess the function fails to bring the plane with itself as that seems to be the reported null value.
(tried in Hurri and spit mkII btw)

Edit: tried different integers just in case. no success.
Edit2: btw, must be the compass that equals null - ja bet it is.
__________________

Last edited by theOden; 11-28-2012 at 05:40 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.