Hi Folks
Can someone who knows more about xml than me (ie everyone) give me a hand?
I am converting the NBAI F-22 to P3D and need a bit of assistance with the tail surfaces.
Nick modeled the engine outlets that move along with the tail.
I would also like to model the tail droop when the aircraft is parked (like this)
This bit of code works great for the moving tail
<PartInfo>
<Name>elevator_key</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>ELEVATOR DEFLECTION</Variable>
<Units>grads</Units>
<Bias>50</Bias>
</Sim>
</Parameter>
</Animation>
</PartInfo>
and this bit of code works great to droop the tail when parked
<Name>custom_anim_F16_Elevator</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:GROUND VELOCITY,knots) 0 !=
(A:LIGHT BEACON,bool) or
if{ A:ELEVATOR DEFLECTION PCT, percent) -0.5 * 50 + }
els{ (A:ELEVATOR DEFLECTION PCT, percent)}
</Code>
<Lag>30</Lag>
</Parameter>
</Animation>
</PartInfo>
My problem is trying to combine them.
All help gratefully received.
thanks
Gavin
The website and forum will be intermittently unavailable while we're making some security updates.
File uploads to the download hangar are also disabled until further notice.
File uploads to the download hangar are also disabled until further notice.
Need help with Elevator XML
Re: Need help with Elevator XML
I am a big fan of the KISS principal so my initial thought is if both bits of code work as you want them to, why combine them to make one complicated statement that could be troublesome to troubleshoot?
Are you trying to get the engine outlets to droop as well on the ground?
I realise that I could be being thick today in not seeing an issue.
Are you trying to get the engine outlets to droop as well on the ground?
I realise that I could be being thick today in not seeing an issue.
Steve
_______________________________________________________
Quid Si Coelum Ruat
_______________________________________________________
_______________________________________________________
Quid Si Coelum Ruat
_______________________________________________________
- clickclickdoh
- MAIW Developer
- Posts: 1568
- Joined: 03 Mar 2009, 03:04
Re: Need help with Elevator XML
Sorry - not making myself clear. I can use one set of code or the other.Firebird wrote: ↑05 Feb 2018, 16:00 I am a big fan of the KISS principal so my initial thought is if both bits of code work as you want them to, why combine them to make one complicated statement that could be troublesome to troubleshoot?
Are you trying to get the engine outlets to droop as well on the ground?
I realise that I could be being thick today in not seeing an issue.
Nicks FS9 model just had the moving elevators, when parked they were level. I am trying to add the droop when parked.
Gavin
Re: Need help with Elevator XML
Try this....
<PartInfo>
<Name>custom_anim_F16_Elevator</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:LIGHT BEACON,bool) !
if{ <DROOP KEYFRAME NUMBER HERE> }
else{ (A:ELEVATOR DEFLECTION PCT,percent) }
</Code>
<Lag>30</Lag>
</Parameter>
</Animation>
</PartInfo>
Info...
(A:LIGHT BEACON,bool) ! - Makes the beacon off condition TRUE
if{ <DROOP KEYFRAME NUMBER HERE> } - If TRUE (beacon off) goto parked keyframe
else{ (A:ELEVATOR DEFLECTION PCT,percent) } - If FALSE (beacon on) use the actual elevator postion.
Not sure why the -0.5 * 50 + is needed on the original code.
<PartInfo>
<Name>custom_anim_F16_Elevator</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:LIGHT BEACON,bool) !
if{ <DROOP KEYFRAME NUMBER HERE> }
else{ (A:ELEVATOR DEFLECTION PCT,percent) }
</Code>
<Lag>30</Lag>
</Parameter>
</Animation>
</PartInfo>
Info...
(A:LIGHT BEACON,bool) ! - Makes the beacon off condition TRUE
if{ <DROOP KEYFRAME NUMBER HERE> } - If TRUE (beacon off) goto parked keyframe
else{ (A:ELEVATOR DEFLECTION PCT,percent) } - If FALSE (beacon on) use the actual elevator postion.
Not sure why the -0.5 * 50 + is needed on the original code.
Re: Need help with Elevator XML
Thanks Weescotty
that worked. I needed to add the -0.5 * 50 back in for the elevators to come back to the neutral position when the lights came on.
Now on to the next challenge.
Gavin
that worked. I needed to add the -0.5 * 50 back in for the elevators to come back to the neutral position when the lights came on.
Now on to the next challenge.
Gavin
Re: Need help with Elevator XML
That -0.5 * 50 + shouldn't be needed.
Try adding a keyframe at 50 with the elevators level and this slightly modded code....
<PartInfo>
<Name>custom_anim_F16_Elevator</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:LIGHT BEACON,bool) !
if{ <DROOP KEYFRAME NUMBER HERE> }
else{ (A:ELEVATOR DEFLECTION PCT,percent) }
</Code>
<Bias>50</Bias>
<Lag>30</Lag>
</Parameter>
</Animation>
</PartInfo>
<Bias>50</Bias> - tells it the 'default' position for the animation is keyframe 50.
They should also function as elevators when the aircraft is flying.
Try adding a keyframe at 50 with the elevators level and this slightly modded code....
<PartInfo>
<Name>custom_anim_F16_Elevator</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:LIGHT BEACON,bool) !
if{ <DROOP KEYFRAME NUMBER HERE> }
else{ (A:ELEVATOR DEFLECTION PCT,percent) }
</Code>
<Bias>50</Bias>
<Lag>30</Lag>
</Parameter>
</Animation>
</PartInfo>
<Bias>50</Bias> - tells it the 'default' position for the animation is keyframe 50.
They should also function as elevators when the aircraft is flying.