January 12, 200323 yr Is there any way to say in XML./..If "A" Happens for "X" amount of time, then "K" ?I have looked for some kind of time operator, and haven't found one..The code I am using is below..ThanksAl(A:ENG1 MANIFOLD PRESSURE,inHg) 29 > (A:GENERAL ENG1 RPM,rpm) 2700 > (A:ENG1 CYLINDER HEAD TEMPERATURE,farenheit) 340 > &&& if{ (>K:TOGGLE_ENGINE1_FAILURE)
January 12, 200323 yr Ok, I can see where you're going with this. A few points to point out:1) &&&, emm? && && would do the trick.2) using if{ (>K:TOGGLE_ENGINE1_FAILURE) } in this fashion would/could prove nasty since it might actually turn on again the engine during the next check. So a check against the failed state of the engine should also be implemented.3) Some users (most?) don't like engine failures, even if they are caused by engine misuse. I even believe that online servers prohibit the use of random failures. So a check against (A:Realism,enum) should be made to ensure this is maxed before any failure triggers are executed.4) Instead of directly triggering the failure, you should consider resetting a timer to absolute time + 30 secs, and when your timer exceeds absolute time; *then* have the failure done.But the way I'm doing failures in my code is gather different "penalty points" depending on how bad the engine is being run; 0.5 pts for turbo overboosting, 1 pts for extremely high temperatures, 2.5 pts for shock cooling etc. This (L:Penalty Points,enum) variable can then be used in temperaures and oil pressures to give an indication that something is about to go wrong here - suddenly the engine gauges becomes important to look at. In the end, when 100 points has been gathered and max realism is used; you fail the engine. Even though it may not be realistic, there should be a toggle on a separate panel that toggle an engine failure; to get it back after a coded failure and to do takeoff failures.
January 12, 200323 yr thanks for all your help, I really Appreciate it!I took your advise, and attempted to put a time check in as well.. I used the code below, but it seemed to start the count as soon as the it started, due to the fact that the engine failed as soon as the CHT reached it's limit.. I would like to have limits reached for atleast 25 seconds before the fail triggers... So I guess what I need to know is.. How do you reset a timer, and also how do you make it so the guage wont take the next value, untill the previouse value is reached..Thanks(A:GENERAL ENG1 RPM,rpm) 2900 > (A:ENG1 CYLINDER HEAD TEMPERATURE,farenheit) 400 > (A:ENG1 MANIFOLD PRESSURE,inHg) 25 > (P:ABSOLUTE TIME,seconds) 25 > && && if{ (>K:TOGGLE_ENGINE1_FAILURE) }Al
Create an account or sign in to comment