Page 1 of 1

help with xml coding

Posted: 09 Jun 2009, 15:06
by andras1
after a long time I managed to build my first ai planes. Now, I am trying to add some xml animations but do not even know where to begin. I would like to add pilots when the beacon goes on and pitot covers that disappear. I would really need an idiot´s guide to xml coding.

I am using FSDS 3.5.1 - can anybody help?

Many thanks

Andras

Posted: 09 Jun 2009, 16:10
by Weescotty
Here is the standard XML code for making things appear / dissappear -

<part>
<name>PARTNAME</name>
<visible_in_range>
<parameter>
<code>
WHAT BUILT IN CODE TO USE FOR APPEAR / DISSAPPEAR VALUE
</code>
</parameter>
<minvalue>A VALUE</minvalue>
<maxvalue>A VALUE</maxvalue>
</visible_in_range>
</part>

So for a part to appear when Nav Lights come on -

<part>
<name>anim_pilot</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV, bool)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>

Min and max values are 1 (True) because you only want the part to show when the Nav lights come on.
This is determined by - (A:LIGHT NAV, bool), if the nav lights are on the value is True. (same as 1).
If you set the <minvalue> to 0 the part would be visible all the time.

Tip - Create a poly (triangle), set it to a heirachical part.
Make all the parts you want to appear childs of it, then use the polys name in the XML. Anything connected to it dissappears when it dissappears.

Two SDK's the Panel and Makemodel ones have a lot of info in them.

Kev

Oops, to make things dissappear - same code but set minvalue to -1, maxvalue to 0. i.e. only show part when lights are off.
When lights are on (A:LIGHT NAV, bool) = True = 1, parts dissappear because neither minvalue (-1) or maxvalue (0) are true.

Posted: 12 Jun 2009, 18:28
by andras1
Thanks,

this is still way beyond me but it is a beginning. I´ll try to read the sdk and see whether I can make any sense of it.

Andras