Jump to content
Sign in to follow this  
n4gix

Triggering Custom Variables in MDL XML...

Recommended Posts

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

Share this post


Link to post
Share on other sites

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 
 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest bartels

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

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest HartmannH

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)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest HartmannH

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

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...