Jump to content

XML Delay Timer / Aerosoft Airbus


schwaki94

Recommended Posts

Hi guys,

 

I've already asked in the german part of the Aerosoft Airbus forum, but didn't get replies. Now I want to ask here, maybe somebody can help me :)

 

Unlike my posting in the german part of the forum I would like to describe you my "project" - and thereby my problem: The real Airbus (especially the old ones, but also some new aircrafts) makes a noise when the generators (and so the electrical contacts) switch from EXT PWR to APU GEN or (at engine start) from APU GEN to ENG1/2 GEN, and so on... I would like to simulate this in the Aerosoft Airbus (it's for me, I will not publish my work - or just via PM). To realize this I edit the sound.xml file in Prepar3D\SimObjects\Airplanes\Aerosoft Airbus A320_A321 Base\Panel_Fallback\AB_Systems. For example, here is one part of the script:

 

Zitieren

        (L:AC1_Conf, number) 1 ==
        (L:GEN1_hbp, bool) 0 == &&
        if{    
            1 (> L:ASC_GenSwitch, bool)
            1 (> L:GEN1_hbp, bool)
        }

 

In general, it checks if the status of the generators change, and if, it has to play a sound file, thereafter set a marker to logical 1 and the script is finished. The file "ASC_GenSwitch" is a sound file, the variable "GEN1_hbp" (hbp means has been played) is described in the panel folder of the aircraft. This script works very fine, I don't have any problems with it!


Now I want to go one step further and would like to get the panel light flicker for a short time so at night you can really "see" this effect. (By the way, I know that this effect isn't really markable in the newer airbuses - but I want to realize that in the sim :) )

I've also already find the required code to switch on or off the panel light (it's (> K:PANEL_LIGHTS_TOGGLE)) - but if I just insert this line twice to let it switch off and on again, it's done in infinitely time and I cannot see this effect. So I need a delay timer which lets switch off the panel light, wait for about 0,1 or 0,2 seconds, and then let it switch on again.

 

And there I got stuck. Working with ABSOLUTE_TIME or an WAIT element in XML did not work. Can you help me?

 

Thank you very much!

 

Best regards

Marius

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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. Privacy Policy & Terms of Use