Running Scripts

Hey everyone,

I am trying to figure out failure scripting, but I am just not able to get them to run. Few of the existing topics I was able to find on the forums here were not very helpful, unfortunately.

What I did was I took one of the example scripts (with added text line, to indicate the script is running) to the same folder as a saved flight, but it does not load. Only way I can get it to run is to use it as an announcement script along with a livery (thus I was at least able to check that the script as such IS indeed working).

Do I do something wrong? The documentation is not really clear about it, I just assumed I need to save a flight and place the script (with the same name) into the P3D files folder. But I am not sure about it...

Just for the information I am running Q400 PRO edition on P3D v4.

Thanks.

Comments

  • This is what I did that made it work:

    1. Copy randomEngineFailureOnV1.mgs from mjc8q400\doc\scripts\examples Folder.
    2. Paste file in mjc8q400\scriptLib\defaultfailures Folder
    3. Back to mjc8q400\scriptLib folder and open defaultFailures.mgs (include line item on bold font)

      INCLUDE \scriptLib\defaultFailures\initMaint.mgs
      INCLUDE \scriptLib\defaultFailures\defFail_Powerplants.mgs
      INCLUDE \scriptLib\defaultFailures\defFail_Avionics.mgs
      **INCLUDE \scriptLib\defaultFailures\randomEngineFailureOnV1.mgs**
      
      BEGIN
      TEXT "DEFAULT FAILURES INITIATED"
      END
      

    Optional:

    I also tried editing script of randomEngineFailureonV1.mgs sample

    BEGIN
    

    gs1 GOTO gs1 #fdeData_->GS < 118 ; Wait until GS is above 118 kts
    gs2 GOTO gs2 #fdeData_->GS < 116 ; Wait until GS is above 116 kts
    rn1 GOTO rn2 %random < 0.5 ; will go to line 6 with 50% chance
    COPY #FADEC_->FADEC_engines[0].FADEC_failure 1
    GOTO jf1
    rn2 COPY #FADEC_->FADEC_engines[1].FADEC_failure 1
    jf1 END

    It all worked, I use FSX Steam Majestic Q400 Pro.
    Hope people can also share tutorial, and additional scripts. I'm having also a hard time understanding how the script works.

Sign In or Register to comment.