July 13, 201015 yr I need a little help (again) pleaseModelling a Ballistic recovery chute for a current Light Sport Aircraft, I have a set of visibility params linked to Spoiler deployment that display the BRS deployment stages when deploying the spolers. This is quite succesful (Although I could never spell that word) However, within the MODELDEF.XML (if possible) I would also like to achieve 2 more peices of the jigsaw. 1) Upon deployment of the BRS (using A:SPOILERS_HANDLE_POSITION) I'd like to add a callback or additional action to the handle that Cuts the engine off entireley .. I Have tried adding an <EVENTID> (> K:MIXTURE RICH) but to no avail .. I'm afraid it looks like I dont have enough XML Programming knowledge to tell it the right thing.. the right way .. etc ;)Secondly .. I would like to then initialize a 100 frame custom Animation "BRS_COLLAPSE" using the parameters SPOILER DEPLOYED= yes + SIM ON GROUND = Yes + This is to display the collapsing chute on touchdownHere is the code I have so far and it would appear I'll have to have "nested" variables or code If thats possible ???The BRS Deployment handle <PartInfo> <Name>Lever_BRS</Name> <AnimLength>100</AnimLength> <Animation> <Parameter> <Sim> <Variable>SPOILERS_HANDLE_POSITION</Variable> <Units>percent</Units> </Sim> <Lag>200</Lag> </Parameter> </Animation> <MouseRect> <Cursor>Hand</Cursor> <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags> <CallbackCode>(>K:MIXTURE_RICH)</CallbackCode> </MouseRect> </PartInfo> Any help with this "engine off" Code would be greatly appreciated But I dont even know where to start on the BRS_COLLAPSE entry (Sorry !) Looking forward to any snippets, pointers or assistance from the XML boffins at Avsim :) Thanks
July 13, 201015 yr Moderator Actually having created such a BRS for the Cirrus SR20/22 series, it's a lot of fun, but also a LOT of effort!Create a small polygon and tag it with the visibility condition named "BRS_Deployed." It's only purpose is to kill the engine should the spoiler handle be pulled. <PartInfo> <Name>Lever_BRS</Name> <AnimLength>100</AnimLength> <Animation> <Parameter> <Code> (A:SPOILERS_HANDLE_POSITION,percent) </Code> <Lag>200</Lag> </Parameter> </Animation></PartInfo> <PartInfo> <Name>BRS_Deployed</Name> <Visibility> <Parameter> <Code> (A:SPOILERS_HANDLE_POSITION,percent) 0 > if{ 0 (>K:KEY_MIXTURE_SET) } </Code> </Parameter> </Visibility> </PartInfo> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 14, 201015 yr Thanks Again Bill .. Fiddling with that code as It dont seem to work straight off the page, you did confuse me a little though with the use of > instead of the expected > .. are they both valid (or was it a simple error) ?I'm sure I can get it going though so Many thanks once again .. Regarding the initialisation of the collapse anim ... Can I do that the same way ?i.e Make a tagged poly become Visible on SIM ON GROUND + BRS DEPLOYED with the Tick18 anim in the code section ????Cheers G
July 14, 201015 yr Sorted ... Many thanks Bill, just needed a tweak here and a tweak there ... <PartInfo> <Name>BRS_ENGINE_KILLER</Name> <Visibility> <Parameter> <Code> (A:SPOILERS LEFT POSITION,percent) 1 > if{ (>K:FUEL_SELECTOR_OFF) } </Code> </Parameter> </Visibility> </PartInfo> Now............. collapsing the darned thing :( LOL
July 14, 201015 yr Moderator Fiddling with that code as It dont seem to work straight off the page, you did confuse me a little though with the use of > instead of the expected > .. are they both valid (or was it a simple error) ?I'm sure I can get it going though so Many thanks once again .. Regarding the initialisation of the collapse anim ... Can I do that the same way ?i.e Make a tagged poly become Visible on SIM ON GROUND + BRS DEPLOYED with the Tick18 anim in the code section ????The > symbol will work just as well as > does. I simply use it out of habit because to my mind it's easier to see.The < symbol will NOT work however, and we must use <It is for this very reason that I use > instead of > though; as I lost count of how many times I've looked at someone else's script and confused < with >... :( You are on the right track for triggering the "collapse" sequence. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 15, 201015 yr Thanks again Bill .. Especially for the comment "your on the right track" :) I may be on track but my knowledge of XML is a little like a buffer, stopping my train of thought dead in its tracks :) Gizza Clue where to point my thinking please Bill ?Here's where I am so far .... <PartInfo> <Name>BRS_Collapse</Name> <AnimLength>300</AnimLength> <Animation> <Parameter> <Code> (L:Collapse, number) </Code> </Parameter> </Animation> </Partinfo> The ANIMATION Section (with of course its own unique Guid in the listing) <PartInfo> <Name>BRS_Collapse_Activation</Name> <Visibility> <Parameter> <Code> (A:SPOILERS LEFT POSITION, percent) 60 > (A:AIRSPEED INDICATED, mph) 20 < and (A:SIM ON GROUND, Bool) 0 > And if{{K:SPOILERS_OFF} AND ---- Start incrementing "L:Collapse" from 0 - 300 ---- } els{ 0 } </Code> </Parameter> </Visibility> </PartInfo> Here's the mental block, I KNOW What i want it to do .. just Not how to Write it in XML'ese :) 1) check the various params for a) spoilers fully deployed ? b) Airspeed below 20 ? c) Wheels on ground ?2 IF "yes" to ALL three params .. Then a) make control poly "BRS COLLAPSE ACTIVATION" visible (Anim will be linked to this poly) b) Close spoilers c) Start L:Var "collapse" incrementing from 0 - 300 OH I WISH IT WAS IN BASIC :) G
July 18, 201015 yr Bumpin - Cos I'm really struggling with this code :( </P> <P><PartInfo> <Name>BRS_Collapse</Name> <AnimLength>100</AnimLength> <Animation> <Parameter> <Code> (L:Collapse,bool) 100 * </Code> <Lag>100</Lag> </Parameter> </Animation> </PartInfo></P> <P> <PartInfo> <Name>BRS_Collapse_Activation</Name> <Visibility> <Parameter> <Code> (L:Deployed, bool) 1 > (A:AIRSPEED INDICATED, mph) 30 < and (A:SIM ON GROUND, Bool) 0 > And if{ (1) (>K:SPOILERS_OFF) (>L:Collapse, bool) } </Code> </Parameter> </Visibility> </PartInfo></P> <P> SUPPOSED TO - 1) make tagged node visible, 2) close spoilers, 3) Initialise Collapse bool Just aint doin wot I thought it ought'a ! :(
July 18, 201015 yr Bumpin - Cos I'm really struggling with this code :( </P> <P><PartInfo> <Name>BRS_Collapse</Name> <AnimLength>100</AnimLength> <Animation> <Parameter> <Code> (L:Collapse,bool) 100 * </Code> <Lag>100</Lag> </Parameter> </Animation> </PartInfo></P> <P> <PartInfo> <Name>BRS_Collapse_Activation</Name> <Visibility> <Parameter> <Code> (L:Deployed, bool) 1 > (A:AIRSPEED INDICATED, mph) 30 < and (A:SIM ON GROUND, Bool) 0 > And if{ (1) (>K:SPOILERS_OFF) (>L:Collapse, bool) } </Code> </Parameter> </Visibility> </PartInfo></P> <P> SUPPOSED TO - 1) make tagged node visible, 2) close spoilers, 3) Initialise Collapse bool Just aint doin wot I thought it ought'a ! :( <Code> (L:Deployed, bool) 1 > (A:AIRSPEED INDICATED, mph) 30 < and (A:SIM ON GROUND, Bool) 0 > And if{ (1) (>K:SPOILERS_OFF) (>L:Collapse, bool) } </Code>(L:Deployed, bool) 1 > should be (L:Deployed, bool) 1 == if it is deployed or 0 == if not deployed(A:SIM ON GROUND, Bool) 0 > should be (A:SIM ON GROUND, Bool) 0 == If it is not on the ground 1 == If it is on the groundif{ (1) (>K:SPOILERS_OFF) (>L:Collapse, bool) } Should be if{ (>K:SPOILERS_OFF ) 1 (>L:Collapse, bool) } Paul EGLD
July 24, 201015 yr Thanks for all the pointers folks, However .. I STILL cant get the little blighter working :) Display is fine ( ie, visibility code works ok) However .. the L:Var never "seems" to initialise and I get no animation .. <PartInfo> <Name>BRS_Collapse_Activation</Name> <Visibility> <Parameter> <Code> (A:AIRSPEED INDICATED, mph) 50 < (A:SIM ON GROUND, Bool) 1 == and if{(L:collapse, bool) ! (>L:Collapse, bool)} els{ 0 } </Code> </Parameter> </Visibility> </PartInfo> <PartInfo> <Name>BRS_Collapse</Name> <AnimLength>100</AnimLength> <Animation> <Parameter> <Code> (L:Collapse, bool) 100 * </Code> <Lag>100</Lag> </Parameter> </Animation> </PartInfo> Any clues people ???
July 24, 201015 yr Just a quick one, Maybe --- if{(L:collapse, bool) ! (>L:Collapse, bool)} should beif{ (L:collapse, bool) ! (>L:Collapse, bool) } notice the spaces after/before the parentheses.Roman FS RTWR SHRS F-111 JoinFS Little Navmap
July 24, 201015 yr Thanks Roman, but tried it both ways to no avail :( I think it may be the way the IF's are nested . (or somthing) However .. just tried something esle and that doesnt work either LOL ... Looked at emergency door anim to try and get the animation timed from "local time" rather than a straight L:var <PartInfo> <Name>BRS_Collapse</Name> <AnimLength>100</AnimLength> <Animation> <Parameter> <Code> (L:Collapse) d (P:local time, seconds) < && if{ 100 } els{ 0 }</Code></Code> <Lag>100</Lag> </Parameter> </Animation> </PartInfo> ALL I changed from the default code is the 1st (L:VAR) entry but ... Same ol' nothing :( Just a quick one,Maybe ---if{(L:collapse, bool) ! (>L:Collapse, bool)} should beif{ (L:collapse, bool) ! (>L:Collapse, bool) } notice the spaces after/before the parentheses.Roman
July 24, 201015 yr Moderator if{ (L:collapse, bool) ! (>L:Collapse, bool) } That makes no sense in this context. All you are wanting to do is set the L:var to be 1 (one). The form above is only used in a <Click> mouse event, because every time you click on the mousepoint it toggles the L:var from 0 to 1 to 0 to 1, etc. if{ 1 (>L:Collapse, bool) } Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 24, 201015 yr HAS to be my syntax Bill ?????? <PartInfo> <Name>BRS_Collapse_Activation</Name> <Visibility> <Parameter> <Code> (A:AIRSPEED INDICATED, mph) 50 < (A:SIM ON GROUND, Bool) 1 == and if{ 1 } </Code> </Parameter> </Visibility> </PartInfo> The above works fine as far as visibility is concerned, Whereas....... <PartInfo> <Name>BRS_Collapse_Activation</Name> <Visibility> <Parameter> <Code> (A:AIRSPEED INDICATED, mph) 50 < (A:SIM ON GROUND, Bool) 1 == and if{ 1 (>L:Collapse, bool) } </Code> </Parameter> </Visibility> </PartInfo> Does not initialise the L: var and prevents the visibility from workingI tried both versions with and without the els{statements It's doin my head in !! :)
July 24, 201015 yr Moderator Why are you bothering to set an L:var and then not use it?Use this for your visibility: <PartInfo> <Name>BRS_Collapse_Activation</Name> <Visibility> <Parameter> <Code> (L:Collapse, bool) </Code> </Parameter> </Visibility></PartInfo> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 25, 201015 yr Why are you bothering to set an L:var and then not use it?Sorry Bill I dont get you ? I do indeed use it, as seen in further code below (& above) <PartInfo> <Name>BRS_Collapse</Name> <AnimLength>100</AnimLength> <Animation> <Parameter> <Code> (L:Collapse, bool) 100 *</Code> <Lag>500</Lag> </Parameter> </Animation> </PartInfo> ALso , could you help me out by explaining how the code you supplied would work ?I'm trying my best here LOL but just cant get the understanding I need to make it as easy as you see it ;)
Create an account or sign in to comment