Archived

This topic is now archived and is closed to further replies.

misho_TerraBuilder

Lockup when starting up engine with empty tanks

Recommended Posts

I've come across an odd problem, and I'm unable to get past it. I used a default Cessna flight model and heavily modified the CFG file to use it as a land vehicle. I've worked out almost all the kinks and bugs, except one:When I run out of fuel, the engine shuts down. If I re-start the engine on empty tanks (without refueling), the vehicle takes off like a bat out of ####, does a wheelie on its rear axle and literally takes off - at which point, the system freezes. Not just a "The FS has stopped responding" message, but a nasty, all-out lockup, requiring a power down of the computer. Now, I know I've heavily modified and hacked the CFG (and AIR) file, so things are probably out of whack, but does anyone know what's going on in this case, and how to remedy that behavior? Any help would be much appreciated!Misho

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Note to self: :)After a good night's sleep and a hearty bowl of corn flakes, I realized that I could call KEY_ENGINE_AUTO_SHUTDOWN event just before the fuel is completely exhausted (say, 1% remaining) and force the engine shutdown until the fuel quantity gets above 1%... I'll give that a try and see if any other "gotchas" crop up...

Share this post


Link to post
Share on other sites

Are you using FSX? The fuel quantity variables only update once per second, and they are stored as integers. It's possible that a fraction of a second of engine operation is overflowing the fuel variables before the engine gets cut off.Doug

Share this post


Link to post
Share on other sites

Hi Doug - no, this is still FS9, but eventually I'll port it to FSX. I noticed that they are stored as integers in percentage numbers... is that what you were refering to?Also, wouldn't this behaviour exhibit in the default aircraft if the case was as you explained it? I thought my changes to CFG did something that resulted in this problem.

Share this post


Link to post
Share on other sites

OK, I wrote some code to call KEY_ENGINE_AUTO_SHUTDOWN and shut down the engine when fuel is low but not completely gone. Now - when I try to re-start the engine (with next to nothing in the gas tanks) it starts up, and then immediately shuts down, all with a LOT of white and dark smoke - as if the combustion is incomplete (what is that effect, btw?). I don't want that effect, so I need to trap the engine autostart sequence and block it while the fuel level is low.What's the best way of trapping an event and BLOCKING it from reaching FS until the certain condition is met? The event I want to trap is KEY_ENGINE_AUTO_START. Also - what's the syntax/method for setting up and calling a gauge initialization routine?

Share this post


Link to post
Share on other sites