claushansen
08-31-2012, 08:33 AM
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
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