Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete!

 

I am running Prepar3dv2 with FSUIPC 4.928 and WideClient 6.999b.

 

I wanted to see if I could create a little lua-program which makes changes to prepar3dv2.

 

So I started to test "MyDisplay.lua" on the client and this works okay (well it only receives data from the sim).

Next I tried your example "init pos.lua" and expected it to set my plane to the place you defined in the program.

Unfortunately it does not do it.

 

So am I wrong with my expectations or what else could I have done wrong/not set up correct?

 

Thx for your advice.

 

Klaus

Posted
Next I tried your example "init pos.lua" and expected it to set my plane to the place you defined in the program.

Unfortunately it does not do it.

 

Well, it certainly works on FSX. I've not tested every SimConnect function on P3DV2. ... but, I've just tried it and it works on P3Dv2 too.

 

I think the problem you are seeing using it with WideFS is that WideClient starts any Lua programs it finds as soon as it gets a connection to FS. I think SimConnect or FSUIPC isn't geared up to do the "Init Pos" action through SimConnect right at that time. Try inserting a delay before the last line, something like

 

ipc.sleep(20000)

 

for a 20 second delay certainly works. Maybe something less will too.

 

Regards

Pete

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.