Click to See Complete Forum and Search --> : Need some help with counters/timers
garry2005
09-11-2005, 07:10 PM
Hi all:
I'm new here, not very proficient with XML, and I'm looking for some help with a couple of issues. Specifically, how to set timers (or counters) in XML, and use the results to perform other tasks.
If anyone replies to this, I'll gladly provide more detailed information about the project. It's probably ridiculously simple for those in the know, but it has me chasing my tail!
Thanks in advance for any help.
Garry (garry@jetcoder.com)
LiLcRaZyFuZzY
09-11-2005, 07:14 PM
could you please post more details?
garry2005
09-12-2005, 05:35 AM
Hey...good morning, and thanks MUCH for the reply!
Okay, the project involves MS Flight Simulator 2004. I'm establishing a multi-player envirnonment (called a virtual airline) for FS4004 users, and I need the ability create "flight packages" for the pilots that include small system failures to occur somewhere during the flight. Not crash-makers, but things like maybe a fuel gauge or navigation radio stops working after "X" minutes of flight...the sort of thing that will add "realism". The game itself (FS2004) allows you to create timed or random failures, and you can save a flight and recall that flight later on. The documentation says (clearly) that these preset failures are saved with the flight, but they are not...when you recall a flight, the preset failures have been reset to zero. It's a bona fide program bug, and has been recorded as such with MS. So, I have to deal with this another way, and the only thing that comes to mind is with XML. I can add a standard XML gauge to every plane (such as maybe AIRSPEED or FUEL REMAINING) which runs when FS is running, and my hopes are that we can use this XML gauge as a launch-pad for the "failure-creating" code. But I don't know the XML code it would require. I've built and edited many XML gauges, so I'm at least familiar with XML, but my abilities are very limited. Imagine this scenario: I want a particular failure to occur after the plane is in flight for 20 minutes, so I wouldn't start the clock until airspeed has reached, say, 80 knots. There are two problems: One, I don't necessarily want to cripple the gauge where the code resides. Two, not all gauges are XML...some are .gau files and are strictly not editable. However, the text for calling ALL gauges resides in a file called Panel.cfg, so maybe it's possible for the XML timer-code to change one of the other lines in this file.
I'm VERY familiar with FS2004 program architecture...I can send you any of the associated files and explain thoroughly how it all works. Perhaps you'll see a different approach than my own ideas.
Again, thanks for the response...sorry this was so long.
Garry (garry@jetcoder.com)
LiLcRaZyFuZzY
09-12-2005, 11:36 AM
sorry, cant help you... :(
garry2005
09-12-2005, 12:47 PM
At least you replied...that's more than anyone has done. Thanks for looking at it anyway.
Garry
LiLcRaZyFuZzY
09-12-2005, 01:48 PM
with what programming language is the xml processed or read?
garry2005
09-13-2005, 07:29 AM
I'm not real sure, but I can find out. Flight Simulator is a complex and fragmented beast. It would be meaningless to even guess at it.
I'll get back to you soon.
Garry