Military AI Works • Visibility bug in FSX / P3D
Page 1 of 1

Visibility bug in FSX / P3D

Posted: 01 Feb 2019, 22:55
by gavinc
Hi,
I have found what I think is a bug in FSX / P3D. Hopefully someone could either confirm or let me know what I am doing wrong.

It appears that light based visibility conditions (ie things triggered by beacon, nav or cabin lights) don't work in FSX or P3D if the engine type in the aircraft.cfg is set to 0 (piston engine).

The other visibility conditions (props etc) work fine but when I set the engine type to piston all the light based conditions (for chocks, cabin lights etc) don't work and they get triggered at pushback.

Set the engine type to 5 (turboprop) and they work fine but of course now the engine isn't right so the aircraft can't fly.

Can anyone think why this might be.

Gavin

Re: Visibility bug in FSX / P3D

Posted: 02 Feb 2019, 06:45
by Firebird
That is not a FSX/P3D bug. That has always been there, it is in FS9 too.

It seems that back in the early days MS wrongly assumed that piston-engined aircraft were old time aircraft and didn't use lights.

What can i say?

Now it could be that I am completely wrong here but this is what I believe to be correct and have done so for years. If I am incorrect then please correct me.

Re: Visibility bug in FSX / P3D

Posted: 02 Feb 2019, 07:23
by John Young
That's my understanding too.

Something similar that caused me to tear my hair out this week that I didn't know until Steve told me, is that Nav lights (and hence any viz/animation triggers) to work in FS9 single engine turboprop or jet aircraft, the aircraft.cfg and .air files must specify two engines, with half the power on each. I've since confirmed that's true for FSX and P3Dv4 too.

Hats off to the person who found the solution.

John

Re: Visibility bug in FSX / P3D

Posted: 02 Feb 2019, 08:40
by ggeccles
This post grabbed my attention as I have numerous piston engine aircraft in my AI Traffic package using visibility conditions triggered by various light conditions.

I just did a quick check and am pleased and relieved to say that all appear to be working perfectly on my system. This is in P3D V4. I do not have FSX or earlier versions of P3D so I am unable to comment on those platforms.

Just to confirm, these aircraft have their engine type set to 0 (piston engine) and have visibility condions based on beacon lights.

Graham

Re: Visibility bug in FSX / P3D

Posted: 02 Feb 2019, 08:49
by Firebird
Could you give us an example so we can check it out. This is something that has bugged people for years.

Re: Visibility bug in FSX / P3D

Posted: 02 Feb 2019, 22:59
by gavinc
ggeccles wrote: 02 Feb 2019, 08:40 This post grabbed my attention as I have numerous piston engine aircraft in my AI Traffic package using visibility conditions triggered by various light conditions.

I just did a quick check and am pleased and relieved to say that all appear to be working perfectly on my system. This is in P3D V4. I do not have FSX or earlier versions of P3D so I am unable to comment on those platforms.

Just to confirm, these aircraft have their engine type set to 0 (piston engine) and have visibility condions based on beacon lights.

Graham
Graham, Piston engine beacon visibility does appear to work, however change the condition to NAV or CABIN light and the behavior won't change. My personal guess is that the only visibility condition that works with piston engines is "lights on" / "lights off"

Gavin

Re: Visibility bug in FSX / P3D

Posted: 02 Feb 2019, 23:32
by ggeccles
Just did a check on 6 AI aircraft and all are working fine. The aircraft I checked were three HTAI single engine Cessnas and three ANAI Pipers. these aircraft are all in my FTX AU AI Traffic pack and I am not aware of any issues.

The visibility conditions were for tie down ropes and wheel chocks directly to the model and cabin lights by a lua script.

The Modeldef code is quite standard as follows:-

<PartInfo>
<Name>custom_part_vis_blocks</Name>
<Visibility>
<Parameter>
<Code>
(A:GROUND VELOCITY,knots) 0 !=
(A:LIGHT BEACON,bool) or
if{ 0 } els{ 1 }
</Code>
</Parameter>
</Visibility>
</PartInfo>

The lua script for the cabin lights is as follows:-

local CabinLight = varget("A:LIGHT NAV", "Bool")

if CabinLight > 0 then
TextureName = "Cabin_Lights.DDS"
end

if CabinLight == 0 then
TextureName = "Cabin_Lights_OFF.DDS"
end

varset("T:EmissiveTexture","String",TextureName)

All is working as it should for me.

I have also used NAV lights for visibility conditions on wheel chocks and warning tags but I think these were for larger aircraft with engines other than piston type.

Graham

Re: Visibility bug in FSX / P3D

Posted: 03 Feb 2019, 01:18
by gavinc
Graham, when you are using the lua script with piston engines do the lights come on a notice-able time before pushback?

Gavin

Re: Visibility bug in FSX / P3D

Posted: 03 Feb 2019, 02:30
by ggeccles
They come on as soon as the NAV lights come on which is only a couple of seconds before push back for most of my smaller aircraft. Not really noticeable unless you are looking out for it.


Graham

Re: Visibility bug in FSX / P3D

Posted: 03 Feb 2019, 08:20
by John Young
Nav lights in FSX and P3Dv4 generally trigger the viz condition on non-piston engines 15 minutes before departure, but users must launch the scene 15minutes before to see the trigger active. If launched after that time, the trigger occurs at departure. With FS9 the trigger will be active if launched at any time within the 15 minutes.

John