• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Local Time Code Var

Messages
38
Country
unitedstates
Hello again,

My new .xml radar gauge I'm working on is in need of some way to update the day and time at time of loading due to AI visibility issues. Below is the current update section:

Code:
<Update id="Update">
            <Frequency>19</Frequency>
            <Script>
        (L:map_ZoomStep, number) 0 == if{
        1 (&gt;L:map_ZoomStep, number)
        @CalculateZoomFactor((L:map_ZoomStep, number)) (&gt;L:map_ZoomFactor, number)
        }
        (L:MapInit) 0 == if{
        1 (&gt;L:LayerAirports)
        0 (&gt;L:LayerTerrain)
        0 (&gt;L:LayerVORs)
        0 (&gt;L:LayerILSs)
        0 (&gt;L:LayerNDBs)
        0 (&gt;L:LayerTags)
        6 (&gt;L:VehicleObjectDetail)
        1 (&gt;L:Filter)
        1 (&gt;L:MapInit)
        }
      </Script>
        </Update>

Does anyone have any suggestions / code snippets that could be added to this section that would fix the problem?

Thanks!!
 
Hi,

I expect that you're not asking what are the simulation variables for time, ie E:LOCAL TIME, P:ABSOLUTE TIME, etc.

If you're looking for an initialization sequence that records time at start-up, then you can include something like this in your Update section:

Code:
(L:Init_Time, bool) 0 ==
  if{
    (P:ABSOLUTE TIME, seconds) (>L:Time Of Loading, seconds)
    1 (>L:Init_Time, bool)
  }

but you have that same initialization logic in your Update script already. So, it's a bit difficult to understand your question.

Bob
 
Last edited:
Hi rpmc,

Thanks for the code snippet, yes, I was wondering which var could be used, Again, what I'm trying to do (and this is probably a long shot) is to get the gauge to focus on what day of the week / time of day it is in an attempt to "trigger" the AI to display when it suppose to. I'm probably "barking up the wrong tree" with this, but I'm fresh out of idea's at the moment.

As I stated, these objects seem to display after doing a time hack, even it's only a one minute interval, which tells me that either the gauge needs to be forced to sync with the FS time engine, or the traffic files need to be tweaked to make sure they load properly at start up (which I've already done!!)

Again, any plausible suggestions are welcome at this point!!

Thanks again!!
 
If you are intending to be in synch with your AI aircraft remember they operate using UTC. i.e. ZULU time.
Try something like (E:ZULU DAY OF YEAR,enum) xx ==
(E:ZULU TIME, hours) xx &gt;
The other parameters are:-
ZULU DAY OF WEEK
ZULU DAY OF MONTH
ZULU MONTH OF YEAR
ZULU DAY OF YEAR

I use my initial examples to trigger failures.


Another var is <Visible>(E:TIME OF DAY,enum) 3 ==</Visible>
3 is night, 2 is dusk/dawn and 1 is day. I use this so that reflections of the red glareshield lights are only visible after dark. (though that's another issue to your question).
vololiberista
 
Last edited:
Again, what I'm trying to do (and this is probably a long shot) is to get the gauge to focus on what day of the week / time of day it is in an attempt to "trigger" the AI to display when it suppose to.

The system variables are:
Code:
(E:LOCAL TIME , number)
(E:LOCAL DAY OF WEEK , number)
(E:LOCAL DAY OF MONTH , number)
(E:LOCAL MONTH OF YEAR, number)
(E:LOCAL DAY OF YEAR , number)
(E:LOCAL YEAR, number)

As I stated, these objects seem to display after doing a time hack, even it's only a one minute interval, which tells me that either the gauge needs to be forced to sync with the FS time engine, or the traffic files need to be tweaked to make sure they load properly at start up (which I've already done!!)

Don't know what you mean by time hack or syncing with the FS time engine, but since you are working with AI ships, have you posted your issue in the AI forums in FSDeveloper? Any help there?

Good luck.

Bob
 
Hey fella's,

I think I tracked down the original cause. Adding a time variable to the update section does make things smoother at time of loading, but the reason for the ships not showing when they're supposed to comes down to their overall altitude in FS! As the ones I'm having problems seeing sit at -1.

I'm reworking the gauge as we speak.

Thanks again!!
 
Back
Top