Hi guys,
My situation is:
I'm trying to develop a custom Flight Computer for a specific aircraft. So far I've been able to create the part in the modeldef.xml, asign the animation with the animationtool in gmax and attach the mouserect to the part.
The code for one of the buttons:
<PartInfo>
<Name>CTU_0</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>(L:CTU_0_KEY,bool) if{ 50 } else{ 0 }</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>
(M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:CTU_0_KEY,bool) quit }
(M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:CTU_0_KEY,bool) quit }
</CallbackCode>
</MouseRect>
</PartInfo>
Now the problem:
There's no animation!!
what I'm trying to do is that the part behaves as a real button, meaning that when I Left click over the part, the button goes down (keyframe 50) and when I release the mouse's left button, the part returns to the original position (keyframe 0)...
I don't know if there is something else necessary for the part to animate since there's no FSX Variable involved...
Please, if anyone is able to give me a hand on this I'll appreciate it.
cheers and happy new year!!!!


Reply With Quote

Bookmarks