1 (edited by [Knight] 2017-11-16 13:59:04)

Topic: Doors on custom sets

How do I get the doors to open when creating a custom set. I'm trying to create a set for the FF757F and I have everything in place and working, but I can't get the doors to open. I am using a set from the 200 and the B loaders work fine but I cant get the Left front door or the Cargo door to open. I've tried everything by editing the file. but no luck.

2 (edited by brat.x-plane 2018-02-16 07:58:02)

Re: Doors on custom sets

It's very frustrating that nobody is replying to questions such as this. It is not documented anywhere that I can find; I've looked everywhere.

But I have at least figured out part of the answer by looking at other sets that handle the doors. It appears you have to edit the .set file in a text editor (outside X-Plane and GHD's own editing interface) to add at least this line for each car that needs to control a door (assuming the door can be opened/closed via a dataref):

01 type_name=Loader
21 dataref=sim/cockpit2/switches/custom_slider_on[0]
...

as well as a dataref assignment statement for each step of the car along its route where applicable (for example, you could set a door dataref to its "open" value while the car is driving *to* the plane, and to its "closed" value for each step driving away *from* the plane).

For the steps *to* the plane, here's the example where the dataref needs to be "1" to tell it to open the door (and we do it on the first step in the animation, but see caveat below):

02 step_nomer=1
...
20 DRFvalue=1

IMPORTANT: you must actually repeat the DRFValue=1 (in this example) definition for *each step* in the current phase (i.e., in this case, each step *to* the plane).

Alternatively, you could wait to set the dataref until the *very last step* of the first phase. That way, you avoid having to keep duplicating the dataref value, and you have the nice side-effect of having the doors only open when the car is really *at* the plane.

If you do set it on the first step of many, you will definitely need to repeat it at least once for the last step of the phase -- otherwise, when GHD runs the animation along the steps, any step that still has the blank value ("20 DRFValue=") will probably (?) reset the value of the dataref, and may have an unintended side-effect of closing the door, for example.  So, be careful about that.

If it wasn't clear, the steps are obviously identified by "step_nomer". Gosh, this post has more actual documentation than I've seen anywhere on the internet, and I just made it up. :-(

-

On the path *from* the plane (phase 2, the first step after the "break"), you probably only need one assignment to close the doors -- but it really depends on the implementation of that plane's door animations and the dataref(s) defined for it.  But in general, it's probably a good idea to repeat the "20 DRFvalue=0" (in this example) assignment statement for each of the steps *from* the plane (for phase 2), as this example shows:

02 step_nomer=7
...
20 DRFvalue=0

(For this example, the 7th step is the first one after the "break", i.e., the first step of phase 2, and if you have 11 steps total, for example, you'll need another of these assignments at the bottom of steps 8, 9, and 10 -- rest as exercise to reader...)

-

To be clear, this example is saying: for the given car (in this case the loader for the SSG-B748i), modify the X-Plane standard "custom slider" dataref (first element of the array, which is the first custom slider) and set it to the value 1 (which starts the animation of opening all the doors on the SSG-B748i).

Each plane is different, and not all planes have defined datarefs for handling animations such as opening doors. But for those that do, you can find the dataref you need for that plane (non-trivial, but doable), and add the two lines above with the proper dataref and value to have GHD assign to the dataref for each "car" in the custom set.

So for example, if you have a luggage loader for a single cargo door on a small plane, the plane will probably have a single custom dataref for the cargo door (such as for example -- just made up -- "myplane/animations/cargo_door", where setting it to 0 means "close cargo door" and setting it to 1 means "open cargo door", for example). So in that example, you'd add a line somewhere in the loader car definition in the .set file for each thing:  21 dataref=myplane/animations/cargo_door     and     20 DRFvalue=1

Hope that makes sense. But the problem is, since you have to edit this manually (I think), you can get into big trouble if you try to edit in the dialog within the plugin in X-Plane, simultaneously with editing externally in a text editor.  The X-Plane plugin may overwrite what you just added. So, I recommend always closing the editor in X-Plane while adding these door datarefs, and reloading the plane (which indirectly causes GHD to reload the config -- I THINK, I'm not sure) .. if not, just quit/rerun X-Plane after each edit to test it.  But .. I mean, once you do one or two of these, it *should* be easy to add the rest.

  Steve

3 (edited by derek 2018-04-18 06:31:48)

Re: Doors on custom sets

brat.x-plane wrote:

Hope that makes sense. But the problem is, since you have to edit this manually (I think), you can get into big trouble if you try to edit in the dialog within the plugin in X-Plane, simultaneously with editing externally in a text editor.  The X-Plane plugin may overwrite what you just added. So, I recommend always closing the editor in X-Plane while adding these door datarefs, and reloading the plane (which indirectly causes GHD to reload the config -- I THINK, I'm not sure) .. if not, just quit/rerun X-Plane after each edit to test it.  But .. I mean, once you do one or two of these, it *should* be easy to add the rest.

Thanks for the clarification!