Hyde wrote in Sun Apr 17, 2016 4:15 pm:Rechard,
That's exactly what I thought.
Do you know how to run the nasal program from model xml instead of set.xml?
I see some nasal code in Models/f-14b.xml, is this for that purpose?
I've just had a look to refresh my memory; and it's roughly like this.
The nasal modules in f-14b-bs-set.xml are loaded and do the work of connecting the RIO to the pilot's aircraft. However the mp-network cannot be loaded until the model is loaded (can't remember exactly why, but it has to be done this way).
So the approach to take is to ensure that you use /sim/multiplay/generic/float or /sim/multiplay/generic/int (0..19 of each) to share the important properties over mp. This is the easiest way. If you look at the F-14 you'll see that a whole heap of animations and gauges are connected to the multiplay properties, because these will work either when flying or as an MP aircraft. If you don't want to change the animations then a nasal module inside the co-pilot to copy the multiplay/generic into the right place will work. See backseat instruments for an example of how this is done.
It gets more difficult if you need to transmit more than the permitted amount of parameters (40). Then you either have to start packing using bits, or use one of the string parameters to share the rest. Using the string parameters (as in the F-14 and the F-15) is quite inefficient and it is something that I'm working on fixing so that we have much better interaction between the front and back seats - but the first thing I'll do is to get the key properties transmitted using ints or floats, and then do the rest probably using the Emesary multiplayer bridge that I'm working on.
Oh, and I nearly forgot this, there are three ways that the F-14 transmits over MP, the missiles are done via mp-broadcast (using string[0]), the backseat instruments via string[1] and the normal MP properties. I have no idea why it was done like this (there was probably a good reason at the time); but I wouldn't recommend using either the mp-broadcast or string[1] the way the F-14 does. The missiles will pack nicely into a 32bit int; and the backseat instruments mostly should be in normal properties.