Results 1 to 3 of 3
  1. #1
    75+ Posting Member



    Join Date
    Nov 2010
    Location
    Copenhagen
    Posts
    80
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Problem with simpel SIOC code

    Hi,

    I'm struggeling with some simpel code. I want to play a WAV file when the aircraft cross 30000 feet.

    I'm using iFly, but i can't see that they have a offset for Altitude, so i'm reading the standard from FSUIPC and it goes good. But this script dosent execute when i'm crossing 30000 feet, any ideas ?

    var 0908, name ALTITUDE, Link FSUIPC_INOUT, Offset $3324, Length 4 // Flight_Altitude FSUIPC offset


    Var 0909


    Var 0910


    {
    L0 = &ALTITUDE
    IF L0 > 30000
    {
    IF V0909 = 0
    {
    &PLAY_SOUND = 4 // play wav file in SIOC Dir
    &PLAY_SOUND = 0
    V0910 = 0
    V0909 = 1
    }
    }
    ELSE
    {
    IF V0909 = 1
    {
    &STOP_SOUND = 4
    &STOP_SOUND = 0
    V0910 = 1
    V0909 = 1 // stop so it only playes once
    }
    }
    }




    Var 0911, name TOC
    {
    IF &ALTITUDE > 30000
    {
    &TOC = 1
    }
    }

    Thanks
    Claus
    www.737sim.dk

  2. #2
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with simpel SIOC code

    That's because the code attached to your Var 910 is never executed... You should get rid off vars 910 and 911 and put that code in Var 908.
    Looks you do not understand yet how SIOC works, here is more info.

    regards,
    Nico

  3. #3
    75+ Posting Member



    Join Date
    Nov 2010
    Location
    Copenhagen
    Posts
    80
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with simpel SIOC code

    Hi Nico,

    That get me a bit forward

    Claus