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.

My ccode INDENTICAL to MS

Featured Replies

Just written the code below to create a SIMPLE VC Switch I can use to activate "Ground mode" Allowing display of chocks and the like.. It "looks" IDENTICAL to other code in the xml file to me ??HOWEVER .. ONLY the ANIMATION Code works ... The MOUSERECT does not give me a selection in attach tool I can select the "Switch_storage_mode" animation and apply it But cant use it ion the Sim cos the Mouserect for the switch doest show in the listWiErD ?<Partinfo> <Name>Switch_Storage_Mode</Name> <AnimLength>50</AnimLength> <Animation> <Parameter> <Code>(L:Stor,bool) 50 *</Code> <Lag>200</Lag> </Parameter> </Animation> <MouseRect> <Cursor>hand</Cursor> <MouseFlags>LeftSingle</MouseFlags> <TooltipText>Covers_And_Chocks</TooltipText> <CallbackCode>(L:Stor,bool) ! (>L:Stor,bool)</CallbackCode> </MouseRect> </Partinfo>Sorry, I dont think I got the "code box" sorted properly ... :(

  • Moderator

No, it can't be "identical" because you didn't follow the capitalization rules...<Partinfo> is incorrect!<PartInfo> is correct! :)Also, "Hand" not "hand"...As for the {code} tags, simply highlight everything, then click on the last icon in the toolbar... The one who's tooltip reads: "Wrap in code tags." :(

<PartInfo>  <Name>Switch_Storage_Mode</Name>  <AnimLength>50</AnimLength>  <Animation>	<Parameter>	  <Code>(L:Stor,bool) 50 *</Code>	  <Lag>200</Lag>	</Parameter>  </Animation>  <MouseRect>	<Cursor>Hand</Cursor>	<MouseFlags>LeftSingle</MouseFlags>	<TooltipText>Covers_And_Chocks</TooltipText>	<CallbackCode>(L:Stor,bool) ! (>L:Stor,bool)</CallbackCode>  </MouseRect></PartInfo>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

D'OH !Thanks Fr Bill, Yes I managed to find that sneaky little Capital "I" after a couple of hours of frustration :) Your such a star regarding XML and peoples problems. !!! Big thanks on behalf of everyone you helped.Now........... Er, If I may be so bold and ask you another please ??(I Promise I'll try and get the code box working) What code would I use to toggle an L:Var,bool if another L:Var,bool is in the "ON" State ??My example is .. two switches, only ONE Should be "on" at any particular time, So they should work as followsBoth OFF = Either would operateOne ON = The other would operate BUT Toggle the first to OFFAnd Vice VersaHere's The working code I Have so far (Thanks to you)

 </P> <P><PartInfo>  <Name>Switch_Storage_Mode</Name>  <AnimLength>50</AnimLength>  <Animation>   <Parameter>	<Code>(L:Stor,bool) 50 *</Code>	<Lag>200</Lag>   </Parameter>  </Animation>  <MouseRect>   <Cursor>hand</Cursor>   <MouseFlags>LeftSingle</MouseFlags>   <TooltipText>Covers_And_Chocks</TooltipText>   <CallbackCode>   (L:Stor,bool) ! (>L:Stor,bool)   </CallbackCode>  </MouseRect> </PartInfo></P> <P> <PartInfo>  <Name>Storage_Mode_Vis</Name>  <Visibility>   <Parameter>	<Code>	(L:Stor,bool) 0 >	(A:SIM on GROUND,bool) 0 >	and	(A:BRAKE PARKING POSITION,percent) 0 >	and	(A:GENERAL ENG COMBUSTION:1, bool) !	and	(L:Maint,bool) !;	and	if{ 1 } els{ 0 }	</Code>   </Parameter>  </Visibility> </PartInfo></P> <P><PartInfo>  <Name>Switch_Maint_Mode</Name>  <AnimLength>50</AnimLength>  <Animation>   <Parameter>	<Code>(L:Maint,bool) 50 *</Code>	<Lag>200</Lag>   </Parameter>  </Animation>  <MouseRect>   <Cursor>hand</Cursor>   <MouseFlags>LeftSingle</MouseFlags>   <TooltipText>Cowling off</TooltipText>   <CallbackCode>   (L:Maint,bool) ! (>L:Maint,bool)   </CallbackCode>  </MouseRect> </PartInfo></P> <P> <PartInfo>  <Name>Maintainance_Mode_Vis</Name>  <Visibility>   <Parameter>	<Code>	(L:Maint,bool) 0 >	(A:SIM on GROUND,bool) 0 >	and	(A:BRAKE PARKING POSITION,percent) 0 >	and	(A:GENERAL ENG COMBUSTION:1, bool) !	and	(L:Stor,bool) 0!;	and	if{ 0 } els{ 1 }	</Code>   </Parameter>  </Visibility> </PartInfo></P> <P>

CODE TAGS .... YAY !!! Thanks Bill

  • Moderator

Before tackling your question, might I ask just what the dickens all these worthless and destructive tags are doing in your script???</P> <P><PartInfo>

Both OFF = Either would operateOne ON = The other would operate BUT Toggle the first to OFF
The following is only the <CallbackCode> for two separate <PartInfo> sections.They toggle the switch, and if the other switch is ON the script will turn it off...
<CallbackCode>	(L:SwitchA,bool) ! (>L:SwitchA,bool)	(L:SwitchB,bool) if{ 0 (>L:SwitchB,bool) }</CallbackCode><CallbackCode>  (L:SwitchB,bool) ! (>L:SwitchB,bool)  (L:SwitchA,bool) if{ 0 (>L:SwitchA,bool) }</CallbackCode>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Er sorry about the <p> Tags .. I think the code box put em there somehow ???I really dont know what they are and they DONT appear in my code .. Thanks again for the pointers !

Before tackling your question, might I ask just what the dickens all these worthless and destructive tags are doing in your script???</P> <P><PartInfo>The following is only the <CallbackCode> for two separate <PartInfo> sections.They toggle the switch, and if the other switch is ON the script will turn it off...
<CallbackCode>	(L:SwitchA,bool) ! (>L:SwitchA,bool)	(L:SwitchB,bool) if{ 0 (>L:SwitchB,bool) }</CallbackCode><CallbackCode>  (L:SwitchB,bool) ! (>L:SwitchB,bool)  (L:SwitchA,bool) if{ 0 (>L:SwitchA,bool) }</CallbackCode>

Hmm , Think I copied it over correctly but appears to do nothing Bill .. Both switches operate regardless of positionDid I miss somethin ?

<PartInfo>  <Name>Switch_Maint_Mode</Name>  <AnimLength>50</AnimLength>  <Animation>   <Parameter>	<Code>(L:Maint,bool) 50 *</Code>	<Lag>200</Lag>   </Parameter>  </Animation>  <MouseRect>   <Cursor>hand</Cursor>   <MouseFlags>LeftSingle</MouseFlags>   <TooltipText>Cowling off</TooltipText>   <CallbackCode>   (L:Maint,bool) ! (>L:Maint,bool)   (L:Stor,bool) if{ 0 (>L:Stor,bool) }   </CallbackCode>  </MouseRect> </PartInfo>

  • Moderator

I don't spot any errors. It should work... :( Right now though, my brain is totally fried. I've been squinting at a model in Max, and script in modeldef.xml and images in Photoshop since 0'dark thirty this morning (that's 6:30 for the civilians)... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

HA HA ... Much experience of "stupid 'o' clock" here to .. I'll hang around till your ready good Sir ;)

I don't spot any errors. It should work... :( Right now though, my brain is totally fried. I've been squinting at a model in Max, and script in modeldef.xml and images in Photoshop since 0'dark thirty this morning (that's 6:30 for the civilians)... :(

Actually Bill.. as you sleep I had a thought, Perhaps we could use a "two birds" concept and switch the switch off "IF conditions in the VIS section are not met" ??see Original working code here ....

<PartInfo>  <Name>Switch_Storage_Mode</Name>  <AnimLength>50</AnimLength>  <Animation>   <Parameter>	<Code>(L:Stor,bool) 50 *</Code>	<Lag>200</Lag>   </Parameter>  </Animation>  <MouseRect>   <Cursor>hand</Cursor>   <MouseFlags>LeftSingle</MouseFlags>   <TooltipText>Covers_And_Chocks</TooltipText>   <CallbackCode>   (L:Stor,bool) ! (>L:Stor,bool)   (L:Maint,bool) if{ 0 (>L:Maint,bool) }   </CallbackCode>  </MouseRect> </PartInfo><PartInfo>  <Name>Storage_Mode_Vis</Name>  <Visibility>   <Parameter>	<Code>	(L:Stor,bool) !;	(A:SIM on GROUND,bool) 0 >	and	(A:BRAKE PARKING POSITION,percent) 0 >	and	(A:GENERAL ENG COMBUSTION:1, bool) !	and	if{ 1 } els{ 0 }	</Code>   </Parameter>  </Visibility> </PartInfo>

I'm just thinking out loud but what if ......... (see proposed <code> section of VIS part here ....

<Code>	(L:Stor,bool) !;	(A:SIM on GROUND,bool) 0 >	and	(A:BRAKE PARKING POSITION,percent) 0 >	and	(A:GENERAL ENG COMBUSTION:1, bool) !	and	if{ 1 } els{ 0 }  (+++ adding code for MAKE SWITCH OFF in the ELS condition +++) </Code>

Would that work ?

  • Moderator

It's possible that it might. I finally managed to sleep a full eight hours without having to get up every 2 hours for a bathroom break......it's a pity that it had to be chemically induced though. I took a Vicodin just after typing my last reply last night...Two months in a row without adequate sleep was really beginning to wear thin.My advice? Don't get old!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

OH My Dear Bill ..... Thanks for the kind advice but I'm afraid I have already reached that particular placeLive certainly begins at 40 .. then its downhill all the way !Graham (Ex PSS)

It's possible that it might. I finally managed to sleep a full eight hours without having to get up every 2 hours for a bathroom break......it's a pity that it had to be chemically induced though. I took a Vicodin just after typing my last reply last night...Two months in a row without adequate sleep was really beginning to wear thin.My advice? Don't get old!

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.