Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Linked animations

Featured Replies

Hi!I am trying to toggle an animation on and off with a switch. Can anyone point me in the right direction or a gauge that I can study?Best,Roger

  • Author
  • Moderator

Assuming that you're refering to a GMax animation, then here is some sample code for the MakeMDL.parts.xml file to control a "reclining seat:" cabin_seat_lr (L:CabinSeatLR,bool) 100 * 40HandSeat Recline (L:CabinSeatLR,bool) ! (>L:CabinSeatLR,bool) The seat may be "reclined" my clicking anywhere on the part named "cabin_seat_lr_xx" in the virtual cabin. If you want to control the part only via a gauge, then leave out the section above, and simply code a gauge to toggle the L:CabinSeatLR variable.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Hi Bill and thanks for replying!Actually, I was trying to find a solution for my problem withs creating a switch for the oxygen system, which I have another thread for in this forum. I still haven't found a solution for it.From what I understand, it is a scripted animation that toggles between two images show the oxygen flow in an indikator. I would like to be able to start and stop that animation with a two-way switch, but as I am new to XML and MSFS, I am having a hard time figuring this out.The code for the oxygen blinker is as follows:"(P:Absolute time, seconds) 4 % 2> if{ 1 (> L:OXFLOW, bool) } els{ 0 (>L:OXFLOW, bool) } (L:OXFLOW, bool)"Thanks,Roger

  • Author
  • Moderator

Well, it's important to keep in mind that the process in a model is different than with a gauge. In your gauge you have two static images that create the illusion of a switch or knob being moved.In the model though, you have a "physical part" that is either "flipped" or "rotated" based on some control variable.In your case, the L:OXFLOW, bool variable would be your "control variable" for the 3d modeled part, so simply replace the L: var in my example code and your animation should work, and be controlled by the 2d gauge. If you also modify the code to toggle the L:OXFLOW, bool variable, then you'll have mouse control of the switch in the VC as well.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.