Jump to content
The simFlight Network Forums

Scenery bgl reading out FSUIPC variable


Recommended Posts

Hi Pete,

I'm using FSUIPC since years but I never tried to create program working with it.

My question is the following:

The values FSUIPC reads are populated as GLOBAL variable?

I have a scenery asm file and I would like to set a condition for a parameter which is populated by FSUIPC. To be more precise: I want a light to show up when the visibility dropes under a specific distance.

I have checked the FSUIPC documentation I found the 04C0 variable as visibility in statue miles:

IFIN fog, 04C0, 0000h, 00C8h

BGL_LIGHT LIGHT_NAV, -0.083, 1.103, 0.083, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 1

fog label BGLCODE

BGL_RETURN

Unfortunately I can not compile this asm. I have an error saying: "nondigit in number"

Do you have any suggestion how could we solve this challange?

Thank you so much for your support in advance!

Link to comment
Share on other sites

  • 3 weeks later...

My question is the following:

The values FSUIPC reads are populated as GLOBAL variable?

Sorry, please explain what you mean. "GLOBAL" is not meaningful without context.

I have a scenery asm file and I would like to set a condition for a parameter which is populated by FSUIPC. To be more precise: I want a light to show up when the visibility dropes under a specific distance.

Which version of FS is this with? I don't believe that's possible with FSX or P3D, though it may be with FS9 and before.

I have checked the FSUIPC documentation I found the 04C0 variable as visibility in statue miles:

That's really only related to the old Adventure Programing Language (APL) weather. You should use 0F8C, and it is statute miles times 100.

IFIN fog, 04C0, 0000h, 00C8h

BGL_LIGHT LIGHT_NAV, -0.083, 1.103, 0.083, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 1

fog label BGLCODE

BGL_RETURN

Unfortunately I can not compile this asm. I have an error saying: "nondigit in number"

Sorry, that looks nothing like Intel Assembly code to me. What is it?

You cannot access FSUIPC offsets directly, only via the FSUIPC interface, as documented. The offset numbers are tokens representing the documented values, they are not addresses.

Do you have any suggestion how could we solve this challange?

If you are using FS9 or before then certain BGL variables can be used via FSUIPC offsets 0DD6-0DDE. Please check the documentation supplied.

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.