Military AI Works • xml code question.
Page 1 of 1

xml code question.

Posted: 05 Apr 2019, 13:54
by mins
Hello.

I ask two questions about xml(or another way).

First, Warning flag moves & Make it disappear after departure.

Second , Turn on landing(taxi) lights after departure.

I've tried many times, but I can't make it.

I look forward to hearing from the great Developer.

Thank you.

Re: xml code question.

Posted: 05 Apr 2019, 16:35
by John Young
Hi Mins,

That's a nice model and I'm pleased to see the transparent canopy.

In FS9, the xml to make RBF ribbons disappear is this:

<part>
<name>parked_part_Nav</name>
<visible_in_range>
<parameter>
<code> (A:LIGHT NAV, bool) (A:VELOCITY BODY Z, knots) 0 != || </code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>

You need to add this to your makemdle.parts.xml file. The easiest way to set up the ribbons is to create the animation on each so they move in the wind. The ribbons will be named tick18_ribbon, tick18_ribbon_01 etc. To make them disappear you need to link the ribbons to the wheel chocks. The chocks will have the name "parked_part_Nav to match the xml name. If you made engine intake covers these too can be linked to the chocks.

The Nav light will cause the chocks and the ribbons to disappear about 15 minutes before departure. If you wanted to, you could have them disappear at departure by using "BEACON" instead of "NAV" in the code line.

If you want a taxi light beam on the ground, create a tiny plane and call this "Light_taxi". The critical bit is that you apply a Material to it called "LIGHT_TAXI".

Next clone the plane and call it Light_taxi_01. Link this to the "Light_taxi" plane. Position both planes where you want the light source and adjust the angle to the ground for the size of beam you want. The lights will be on only after departure and until the aircraft passes the runway hold line.

Landing lights work the same way, using two planes (light_land and light_land_01) for each light, except that the material name is "LIGHT_LAND". The lights will come on as the aircraft leaves the runway hold line. To switch them off when the gear comes up, create a small cube and hide it somewhere. Call this part "c-gearlight" and link the first plane to it, so you have "light_land_01" linked to "light_land" and that one linked to "c_gearlight".

If you can open a Gmax file, I can send you a sample set of lights if that would help.

John

Re: xml code question.

Posted: 06 Apr 2019, 00:00
by miljan
Mins it was expected somehow that you make this model . Looks great .
As per animations , John gave answers .

Re: xml code question.

Posted: 06 Apr 2019, 03:00
by mins
Hi, John.

Thank you for your kind reply.

But it doesn't work the way it does.

This is my tick18 xml.

<part>
<name>tick18</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,number)----->I am currently using a pilot(head move).
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>

There seems to be a problem.

Thank you.

Re: xml code question.

Posted: 06 Apr 2019, 05:11
by John Young
Hi Mins,

You don't need a custom block of xml code for tick18. It's already in the default FS9 xml. All you have to do is call the pilot head "tick18_head" and that will activate your animation.

What you need to do is link the head to the pilot body, which is called "AI_Pilot". This block of code does the opposite of the parked parts code. It makes the pilot (and the head) appear, not disappear, when the Nav lights come on:

<part>
<name>AI_Pilot</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT Nav,bool)
</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

John

Re: xml code question.

Posted: 06 Apr 2019, 07:12
by mins
Dear John.

Finally, the ribbon works perfectly.

In the meantime, I seem to have clashed with my tick18 code block (Delete & add your ai_pilot xml).

And "LIGHT_LAND" works well (Material & c_gearlight link).

However, "LIGHT_TAXI" does not work (Material & light_case_taxi link?).ㅜㅜ

It'll be perfect if we solve this.

I'm so happy anyway. Thank you very much.^ ^b

Re: xml code question.

Posted: 06 Apr 2019, 07:24
by mins
miljan wrote: 06 Apr 2019, 00:00 Mins it was expected somehow that you make this model . Looks great .
As per animations , John gave answers .
Dear miljan.

I keep learning and studying. I always make practice models.

You are a great Developer. I'm always grateful for making a your great model.

Thank you very much.^ ^

Re: xml code question.

Posted: 06 Apr 2019, 07:58
by John Young
Sorry Mins, I forgot a step in the taxi lights set up. You need to attach "Light_taxi" to a small polygon that I call "light_case" (no material needed), so you have:

"Light_taxi_01" ----> "Light_taxi" ----> "light_case".

"light_case" can be a 3-D lamp if you have modelled one, if not justuse a very small plane positioned where you want the light.

John

Re: xml code question.

Posted: 06 Apr 2019, 16:08
by mins
Hola...

John.^ ^b

Thanks to your answer, everything works perfectly now.

Everything I've been wondering about has been solved.

I'm going to paint now.

Thank you once again.

Re: xml code question.

Posted: 06 Apr 2019, 16:28
by John Young
I'm really impressed with what you have achieved Mins and that you are picking up new techniques as you go.

Just keep coming back when you want more.

John