• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Landing Light

Messages
97
Country
sweden
Hello,

Anyone have a tutorial on how to create the landing/taxi light ground splash and how to turn it off and on using FSD?

I have tried to create a landing light ground splash in FSD and I made a semi-transparent polygon to act as light....and animated the polygon/light so that it moves down/into the ground and out of the visual field of the pilot in the VC when the light is turned off and the opposite when the light is turned on.

This does not give me the desired effect that I want because I want the light to turn off immidiately because the landing light bulbs dont move so the light emitted from the landing lights should not move either; just turn on and off.

I am using FSX.

Any hints or comments are appreciated :)

Regards,
John Stewart

ps. sending some photos of my project :D
 

Attachments

  • 2012-4-12_11-38-33-746.jpg
    2012-4-12_11-38-33-746.jpg
    81.7 KB · Views: 731
  • 2012-4-12_11-38-20-526.jpg
    2012-4-12_11-38-20-526.jpg
    98.1 KB · Views: 716
  • 2012-4-12_4-6-34-862.jpg
    2012-4-12_4-6-34-862.jpg
    97.3 KB · Views: 692
Last edited:
Include a <Visibility> line in your XML code that tests for the landing light variable?
 
Pesky landing light....

Can anyone give me the XML code for a landing light....so that I can see the programming structure? :confused:
 
Can anyone give me the XML code for a landing light....so that I can see the programming structure? :confused:
Code:
  <PartInfo>
    <Name>light_landing_on</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:LIGHT LANDING,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>

  <PartInfo>
    <Name>light_landing_off</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:LIGHT LANDING,bool) !
          (A:ELECTRICAL MASTER BATTERY,bool) !
          or
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
 
Thanks Bill.....should I insert a image parameter in the code some where as well?

How do I, "connect" the code to the landing light switch in the virtual cockpit? Do I have to insert X, Y, Z coordinates in the xml code to place it in the correct place over the switch in the virtual cockpit or how does that work?
 
Last edited:
That script I posted is for the attachpoint for the fx_landing.fx effect file (lightsplash).

The switch is another script entirely, the script for which is already in the modeldef.xml file by default:

Code:
    <PartInfo>
        <Name>switch_landing_light</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>LIGHT LANDING</Variable>
                    <Units>bool</Units>
                    <Scale>50</Scale>
                </Sim>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_GAUGE_LIGHT_SWITCH_LANDING</HelpID>
            <TooltipID>TOOLTIPTEXT_LIGHT_SWITCH_LANDING</TooltipID>
            <EventID>LANDING_LIGHTS_TOGGLE</EventID>
        </MouseRect>
    </PartInfo>

To use this, you would simply animate your 3d switch in the VC using 50 keyframes, then use the Animation Manager and Attachpoint Tool to assign "switch_landing_light" to the 3d switch object.
 
Alright......that make things a little bit clearer but I am using FS Design Studio and there is a animation funktion and I have animated the landing light switch but I can not find the attach point function as you described it :( Is this function only available in GMAX or do I have to write the code by hand?
 
I have absolutely no idea how Louis integrated Attachpoints in FSDS...
 
In the FSDS main folder there is a file called PartDataDefs.txt.
It should include this line of code:
Code:
attachpt_landing_1 	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint name="attachpt_landing_1"> <AttachedObject> <Effect effectName="fx_landing" effectParams=""/> </AttachedObject> </Attachpoint> <Visibility name="general_light"> </Visibility> </FSMakeMdlData>

You call the part attachpt_landing_1.

I'm not sure if it is necessary, but I add that name to the [FSX Aircraft visibility] section of another file called PartNames.txt.

Then in the Part Properties dialog, Browse, Category, FSX Aircraft Visibility dropdown, click onattachpt_landing_1.

That is how to do it in FSDS

Roy
 
In that case then, you might wish to use this that will take advantage of the custom <Visibility> script I suggested in my first post.

The "default" uses "general light" which isn't really very specific at all. The following will use "light_landing_on" which is keyed to both the battery switch and the landing light switch.

Lights should not be on if the master battery switch is OFF... ;)

Code:
attachpt_landing_1 	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint name="attachpt_landing_1"> <AttachedObject> <Effect effectName="fx_landing" effectParams=""/> </AttachedObject> </Attachpoint> <Visibility name="light_landing_on"> </Visibility> </FSMakeMdlData>
 
Bill
Thanks.
The FSDS PartDataDefs file is IMHO a bit of a mess.
It is also UberCritical about the number of spaces folowing the part name.
Another reason for my blankaphobia
Will modify accordingly. (the file that is, nothing I can do about the phobia)

Roy
 
Still having problems getting the landing light to work.

Hello again....

I am still not able to get the landing light to work. I have added the code that you two have mentioned above to the files mentioned.

The result is that I can see the light splash on the ground now but the animation of the landing light switch is, "stuck" I can't click the landing light switch anymore so that the switch move when I click it.

I have tried pressing Ctrl-L to turn on and off the landing light but the landing light splash remains lit and the switch moves using key commands but not when I click on it using the mouse?!?!

If I understand you two correctly I need the following to make this work:
(1) Make a landing light splash form using a polygon infront of the airplane; adding Alpha texturing and L texture on top of the polygon?
(2) Add the code to the .txt files mentioned by you two above?
(3) Make the light attach to the ground splash/polygon texture using FSDS light attach?
(4) Assign FSDS, "part name", "landing light" to the landing light switch?

anything else?

I should mention that this airplane is made for FSX and the landing lights can be seen on the exterior model and they turn on and off nicely on the exterior model but the problem is to see the landing light splash on the ground from the VC and to make the landing light switch turn on and off the light.

Regards,
John Stewart
 
(4) Assign FSDS, "part name", "landing light" to the landing light switch?

There is your problem. If you used the stock "switch_landing_light" animation in the modeldef file, you have to name the switch the same in FSDS. Easiest way is to look for that name in the FSDS FSX Animation drop down and select it.

Roy
 
Thanks Roy for the suggestion. I have tested changing the name of the landing light switch but it didn't work. I suspect I am doing something wrong with the texturing on the exterior polygon.

I have not created a .Xml or .fx file for the light because I don't see why I should make one when I am using the VC? FSDS add the correct information into the .model file and find the standard fsx landing lights after I have animated the landing light switch and added a correctly textured polygon when I compile the aircraft in FSDS; or no? :o

I don't know if I need to create a .Xml file and a .fx file? I have covered the polygon with a .tga texture having alpha activated on it. I have animated the switch....and I have attached the landing light but nothing happens when I switch the landing light switch. :confused:

John
 
When I create a landing light with FSDS this is all I do.
1. Place a small polygon in front of the shape for the light. The Y axis of the polygon should be pointing backwards, opposite to the direction of the light beam. Call this polygon attachpt_landing_1. This means that the visual effect of a landing light "fx_landing.fx" will start from that attachment point. It will be visible in all views.
2.Name the switch by picking it from the FSX animated parts drop-down. You want switch_landing_light. Then animate it.

Since the stock switch_landing_light entry in modeldef.xml has a mouse rectangle, when compiled you should get a "Hand" cursor and a tooltip. They must be there for you to control the switch in the VC.

No textures involved.

Roy
 
Back
Top