Jump to content
Sign in to follow this  
n4gix

repeating poly's

Recommended Posts

Guest jprintz

I think I know the answer (crap!), but just in case...Is there any way to call or insert or whatever a poly that repeats many times, over and over again, outside of the element in which it's originally defined?What I mean is, say I build some kind of polygon, composed of 10 points, some place up above in the gauge, maybe 5 element layers in. Is there any way to call that original polygon down below, from within different elements? This would be great, as I'm currently working on something where the same "image" poly is needed in many places (and they must be in different elements)... and my goodness would such a feature make the code more readable and maintainable!! Avoiding all those point re-definitions would cut my gauge length in half!I know macros are merely literal replacements of text, so that's a no go, until they support an as a child. Is there any other way to accomplish this, like maybe a mysterious and mostly unknown tag? It would be undocumented, or course, like so many features are, and I don't see such a thing in any default gauges, but then again there's no particular need for it in any of the default gauges...The answer to "does it exist" is "no way," isn't it? ;-)Microsoft, if you're reading, and if XML is, as stated, going to be expanded and be the way of the future, such capability would be a wonderful addition... and could you please make it available even beyond polygons, please? Heheh. Just dreaming here I guess... I love some of the new additions and detail in FSX-style XML, but miss the efficiency and brevity of the FS9-style.

Share this post


Link to post
Share on other sites

There is no way that I'm aware of...For the future, spend some time studying Lua (http://lua.org). It should make its debut entry in TrainSim 2's release.


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

I've been on a Lu(au) since I saw your first post about it. It's a very handy little language. Not much of an API behind it though. Hopefully, the entire SDK will be aggregated into a library which can be called in Lua - that'll be the day.


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

Hi,What is the form of the polygon?Sometimes you can mimic it with some text or symbol; then you can use the macro.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

I've never experimented with the "goto" in XML scripting, so I honestly don't know whether this would work, but...If your or :(g0...gn Goto label. Execution will jump to the specified label. Labels are set by entering a colon followed by the label number. Shoot... :-bang


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

>>The answer to "does it exist" is "no way," isn't it? ;-)>Yes, and I'm afraid it will always be "no way" in any script-dependant "language", using XML, LUA or other platform alike.You need a true function to acomplish that, and that's what C/C++ was invented for !! ;-)Tom

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...