Jump to content
The simFlight Network Forums

lua script prepare3d v2.3


Recommended Posts

hello

i find a lua script for cabin sound turbolence for my seat with trasducer.

  i copy in a notepad file call  ipcready.lua   in a prepare3d v2.3 machine  module folder

 

 

my fsuipc version is the last. 

the soun is in a prepare3d folder sound

 

no sound

thancks for help

zanichelli

 

 

 

 

 

Link to comment
Share on other sites

i find a lua script for cabin sound turbolence for my seat with trasducer.

  i copy in a notepad file call  ipcready.lua   in a prepare3d v2.3 machine  module folder

 

my fsuipc version is the last. 

the soun is in a prepare3d folder sound

 

no sound

 

Sorry, but you need to give more details. What is the actual version number of FSUIPC, and where is the Lua script? Have you tested it properly?  Has it ever worked?

 

I really cannot help solve your problems without your help. FSUIPC's Lua libraries have not changed for a long time and work fine.

 

Pete

Link to comment
Share on other sites

hello peter

the fsuipc version is 4.936  for prepare3dv2.3

the script have work before when i fly with fsx, not remember if the installation was in server or client machines.

the script is exact the same in a contribution section.  ( topic 73943)

can run in a prepare3d pc or i have to instal in a client pc via wideclient?

regards zanichelli

Link to comment
Share on other sites

the script have work before when i fly with fsx, not remember if the installation was in server or client machines.

the script is exact the same in a contribution section.  ( topic 73943)

 

Sorry, I don't seem to be able to search on topic numbers. Can't you show me the script? And have you checked the FSUIPC4.LOG file to see if there are any errors.

 

There's absolutely no difference between P3D and FSX in this area -- the sound facilities are entirely independent of the FS version.

 

can run in a prepare3d pc or i have to instal in a client pc via wideclient?

 

Didn't you say the sound was in the Prepar3D sound folder? There won't be one of those on a client PC will there?

 

Pete

Link to comment
Share on other sites

hello Pete

--turbolence looping sound--

 

 

sndflg=0

ref=0

 

function turbolence(offset,value)

ground=ipc.readUW(0x0366)

if  (value>0)and(sndflg==0)and(ground==0) then

ref=sound.playloop("turb.wav")

sndflg=1

 

end

 

if (value=0)and(sndflg==1) then

sound.stop=(ref)

sndflg=0

 

end

end

 

event.offset(0x0E88,"UW","turbolence")

event.offset(0x0E98,"UW","turbolence")

 

 

the script is name IPCREADY.LUAis in a folder MODULE in prepare3d   machine

the sound is in a sound folder prepare3d machine

the configuraccion fsuipc:

[sound]

Path=c:\Program File (x86)\Lockheed Martin\Prepare3D v2\sound\

 

The fsuipc4.log there are no errors

LUA.0 beginning C:\Program File (86)\Lockheed Martin\Prepare3D v2\Modules\ipcready.lua

 

but no errors

 

regards zanichelli

Link to comment
Share on other sites

The fsuipc4.log there are no errors

LUA.0 beginning C:\Program File (86)\Lockheed Martin\Prepare3D v2\Modules\ipcready.lua

 

but no errors

 

 

Try enabling the Lua debug/trace option on the FSUIPC logging page. Since you are having the Lua started when FS starts you'll need to enable that option then restart P3D.

 

BTW this line is wrong:

 

sound.stop=(ref)

 

That's going to mess things up, if it is ever executed. It should of course be 

 

sound.stop(ref)

 

You could also using FSUIPC's monitoring facilities to see if offsets 0E88 and 0E98 ever change. If they are never set >0 then the sound will never trigger.

 

If you want to check that the sound would play if it is triggered, just try adding this at the beginning:

 

ref=sound.playloop("turb.wav")

ipc.sleep(3000)

sound.stop(ref)

 

Pete

Link to comment
Share on other sites

hi pete

your small script work ok  when prepare3d start the sound play and after the time stop.

i have check the two offsets   0E88   and 0E98  and the value never change.

 

Okay, so the weather values used to set those offsets don't change. Are you sure you get any turbulence? Use the weather logging to check FSUIPC is reading the weather using the standard SimConnect weather facilities.

 

Pete

Link to comment
Share on other sites

the weather log apparent ok all informacion about wind, interpolation, posiccion, look correct. but the offset not change

 

The offsets only change if there is turbulence reported at the altitude of your aircraft. Saying the weather looks okay doesn't help. You need to work it out.

 

Pete

Link to comment
Share on other sites

hi pete

i am not capable to interpretate this data.

i test fly in a real turbolence area whit opusfx . and all look i am in turbolence zone 0 visiblity,rain and in the ND speed and alimeter is constantly strong change.in the ND weather area color is yellou and red.

the orizont is muving.

the log weather wind correspond at my ND value.

but the two  offset not change.

i remember when i have fly with FSX  the sound play and same script work.

i change to prepare3d v2.3  3 months ago copy script but no work

regards

zanichelli

Link to comment
Share on other sites

sorry pete

i see this line in wather log.

Result:fs98 Tstorm  type=10,from1600ft to 31600ft  (+/-0ft), cover=8, turb 252, ice=0

many othr line is the same  turbolence=4,   turbolence=3 etc.

regards

zanichelli

 

and what is your aircraft altitude?

 

Maybe you should save the flight at the point you think it is wrong, and ZIP up the FLT + WX file and send it to me, petedowson@btconnect.com.

 

All FSUIPC does for those offsets is search through the cloud and wind layers, trying to find one in which the aircraft is flying. Then is computes the nmubers to go into those offsets. This has been working fine -- in fact something like the Lua you are using is in use by many folks with no problems.

 

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy 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.