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.

Triggering Custom Variables in MDL XML...

Featured Replies

  • Moderator

I wish to toggle a custom variable in a VC via the makemdl.parts.xml coding schema, but no where in the entire file is there an example of how to do this...What is clear is that some form of is needed, but I've been unable to get anything to function: cockpit_doorCockpitDoorbool5040 (M:Event) 'LeftSingle' scmp 0 != ????? What is a rather trivial .... sequence in a gauge has become a nightmare in the MDL XML coding schema... :(Anyone with ideas, or better still, a solution? :)FWIW, the animation part is just fine, since I've temporarily used SMOKE_TOGGLEfor the "trigger..."

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Bill,I took a look at the stock FS04 MakeMDLparts.xml and some clues may be found near line 163 switch_ignition_magnetos_dc3Although not experienced in MDL making this may be an option with reference to above.cockpit_door(L:CockpitDoor, bool) 40HandLeftSingle (M:Event) 'LeftSingle' scmp 0 != if{ (L:CockpitDoor, bool) ! (>L:CockpitDoor, bool) } Regards,Roman(KGRB)

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

  • Author
  • Moderator

Thanks, Roman... Unfortunately, all I see is a cute little "hand" when hovering on that door.FWIW, here is the relevant portion of the makemdl.parts.xml I'm trying out. One door is tagged with "cockpit_door" and the other is tagged "cockpit_door_l"...The cockpit_door_l code is working fine using the stock SMOKE ENABLE variable, but the other, using the custom L:CockpitDoor variable is not...Note that I've tried both your code example, and the one below that adds the 1 == to the code statement, but neither will work... cockpit_door(L:CockpitDoor, bool) 1 == 40HandLeftSingle (M:Event) 'LeftSingle' scmp 0 != if{ (L:CockpitDoor, bool) ! (>L:CockpitDoor, bool) } cockpit_door_lSMOKE ENABLEbool10040HandCockpit_DoorSMOKE_TOGGLE

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Just a guess: what about (L:CockpitDoor, bool) ! (>L:CockpitDoor, bool) only?

  • Author
  • Moderator

>Just a guess: what about>> > (L:CockpitDoor, bool) ! (>L:CockpitDoor, bool)> >>only?At this point Arne, I'll give anything a try. Once the "magic formula" is developed, then any further work will be a breeze.The chief problem is that MS did not provide one, single example of using an L: variable in a Mouse Event... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • 4 weeks later...
  • Author
  • Moderator

BUMP!I'm still unable to achieve my goal... :(Any more ideas, anyone? :)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Bill, this is a tested and working part from one of my makemdl.parts.xml files. Hopefully it does what you need.cabin_door (L:CabinDoor,bool) 100 * 100HandCabin Door (L:CabinDoor,bool) ! (>L:CabinDoor,bool)

  • Author
  • Moderator

Perfect! Thanks, Hans...I finally see what I have been missing... the fact that I needed to take the bool value and multiply by 100 to actually give the animation some numbers to work with... A "one frame animation" isn't going to be very visible... :)The "lights are now on" in my house!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

>Perfect! Thanks, Hans...Well, not quite "Perfect," as this is incorrect syntax:Cabin DoorThis however, WILL work:Cabin Door

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

oops ;-)

  • Author
  • Moderator

Hey, don't be too hard on yourself; you got the IMPORTANT part right, after all... :)Thanks again for helping me see the forest for all the trees!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Oh, I won't be. But Mikko will want to kill me as he has to recompile all ATR models now:-lol

  • Author
  • Moderator

>Oh, I won't be. But Mikko will want to kill me as he has to>recompile all ATR models now:-lolUh oh! I hope you live in a galaxy far, far away... :)

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.