Page 1 of 1
xml again
Posted: 29 Sep 2009, 05:53
by andras1
Hello again,
I am afraid this is another xml question. I have built a little piston engine aircraft to which I have attached animated tie downs etc. Thanks to Weescotty my first xml attempts went well. I attached the disappearance of the tie downs to the strobe lights which (in principle) works perfectly. However, the small planes push back without nav or stobe lights on. This means the tie downs do not disappar before the push back is finished which looks silly.
Is there any other event or command to which I can attach the disapperance of the tie downs - like battery on or so. Or is there a smatrer way of doing this?
Thanks
andras
Posted: 29 Sep 2009, 07:03
by Weescotty
As we found out - Piston engined aircraft do not respond to Nav, Strobe or Landing lights as AI.
There are a couple more you could try but I ca'nt remember what they are......IDENT? etc
Posted: 29 Sep 2009, 15:04
by aerogator
I'd like to know as well. Airstairs work fine when the plane is pointed out but if it has to push back, the stairs follow until the engines start.
Thanks,

Posted: 29 Sep 2009, 16:51
by andras1
well there was a mistake in my first post. not the strobe but beacon. Beacon works only that it is switched on after push back...
ident?
would be grateful for some further suggestions
Posted: 29 Sep 2009, 23:34
by Weescotty
This is all the available lights -
LIGHT STROBE
LIGHT PANEL
LIGHT LANDING
LIGHT TAXI
LIGHT BEACON
LIGHT NAV
LIGHT LOGO
LIGHT WING
LIGHT RECOGNITION
LIGHT CABIN
You could try -
<name>YOUR PART NAME</name>
<visible_in_range>
<parameter>
<code>(A: VELOCITY BODY Z, knots) 0= (A: LIGHT BEACON, bool) ! * </code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
Should work like this -
If it isn't moving = 1
If Beacon is off = 1 (the ! turns the 0 into 1)
1 * 1 = 1 (minvalue)
If either if false (plane moving or beacon on) the result is 0 so the part shouldn't be displayed.
It might need * * instead of just the one * in the code section.
Posted: 01 Oct 2009, 08:24
by andras1
thanks, I will try all the lights and then report back
Posted: 01 Oct 2009, 18:33
by andras1
Hello Weescotty
thanks for the code but unfortunatley it did not work. The part did not show at all, neither when the plane was standing nor when it was moving or putting the beacon on.
Any ideas?
Thanks
Posted: 01 Oct 2009, 19:08
by Firebird
Now I am not an expert here but Nick makes his Vinka pilot appear when the light beacon is on. If the pilot appears before push back, then the code is quite simple.
However I am still not able to get to my main puter yet! So can somebody check to see if the pilot anim meets the requirements.
Thanks.
Re: xml again
Posted: 10 Oct 2009, 21:12
by Weescotty
Try replacing code section with (I forgot a space)-
<code>(A: VELOCITY BODY Z, knots) 0 = (A: LIGHT BEACON, bool) ! * </code>
Copy and paste it in.
If nothing, time to test variable/values being returned -
<code>(A: VELOCITY BODY Z, knots) 0 = </code>
If that works try -
<code>(A: LIGHT BEACON, bool) ! </code>
Both of the above should make the stairs visible at start, but vanish at different times.
If not let me know which one.
Re: xml again
Posted: 11 Oct 2009, 18:47
by andras1
Thanks
I used all three versions of the code like this
<part>
<name>tied_downs</name>
<visible_in_range>
<parameter>
<code>(A: VELOCITY BODY Z, knots) 0 = </code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>tied_downs</name>
<visible_in_range>
<parameter>
<code>(A: LIGHT BEACON, bool) ! </code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
and
<part>
<name>tied_downs</name>
<visible_in_range>
<parameter>
<code>(A: VELOCITY BODY Z, knots) 0 = (A: LIGHT BEACON, bool) ! * </code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
but the tie downs did not show at all
the only code that is working is the one you gave me some time ago and goes like
<visible_in_range>
<parameter>
<code>
(A:LIGHT BEACON, bool)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
The onle problem is that the plane pushes back with the tie dons on
Any more ideas??
Re: xml again
Posted: 11 Oct 2009, 19:16
by Weescotty
Try this
<part>
<name>tied_downs</name>
<visible_in_range>
<parameter>
<code> (A:LIGHT BEACON,number) ! </code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
Re: xml again
Posted: 12 Oct 2009, 07:53
by andras1
Weescotty, this one works now, how can I connect it to the body speed
Re: xml again
Posted: 12 Oct 2009, 11:42
by Weescotty
andras1 wrote:Weescotty, this one works now, how can I connect it to the body speed
Think it was adding the max value in, so try -
<code> (A:LIGHT BEACON,number) ! (A: VELOCITY BODY Z, knots) 0 = * </code>
Re: xml again
Posted: 14 Oct 2009, 13:09
by andras1
Hello Weescotty,
I got it to work but somewhat different from your last suggestion.
I attached the visibility of one part to the ground speed, which made it disappear when the plane was pushing back and then made the invisibility of another part subject to the beacon being switched on. Then I made the second part parent to the first part using the hierarchy in FSDS.
It is probably not the most elegant code in the world but it seems to work. The tie downs disapper when the plane pushes back and reapper only when the beacon is switched off. Although it is is not fully your proposal, without your help I would definitely not have made it - many thanks.
Now I´ll try to do the same with the pilots only that this time they should apper when the plane pushes back - let´s see.
The next plane I want to build is a Bell twin two twelve. When they are parked their main rotor is tilted backward. Is their a way manipulate the FS2004 stock animations by using xml and if not can I replace the rotor completely by an xml animated rotor?
Thanks
Andras