Mr_Tea 0 Posted May 1, 2005 Is it possible to make an helicopter that is running out of fuel, land at a free place, instead of flying until the bird is falling down? Share this post Link to post Share on other sites
Homefry 0 Posted May 2, 2005 Sure it's possible... but what do you mean by a free place? Share this post Link to post Share on other sites
Victor_S. 0 Posted May 2, 2005 I think he means that he wants it to be able to land in an area that is free of any obstructions ex. a forrest EDIT: now that I think about it the ai would do that anyways. Share this post Link to post Share on other sites
Mr_Tea 0 Posted May 2, 2005 I meant the AI should land on any place that is free and big enough to make a normal landing, without crashing into something. At the moment the AI is trying to refuel, but hovers at normal hight, that is far to high to start refueling. And at that place the AI hovers until the helicopter is coming down caused by the engine ,that stop when the fuel is out. What I want is that the AI lands the helicopter before the fuel is running out. EDIT: without many words: If fuel=low, heli land Share this post Link to post Share on other sites
Homefry 0 Posted May 2, 2005 Sure... just use the fuel command... remember it ranges from 1 to 0... I'll write something off the top of my head... probably full of errors and won't work (I haven't done any scripting in a while). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _helo = _this select 0 #Fuelcheck ?(fuel _helo < .2) : goto "heloland" ~5 goto "Fuelcheck" #heloland _helo land "LAND" exit Something like that... syntax not guaranteed... good luck mate. Share this post Link to post Share on other sites
Mr_Tea 0 Posted May 3, 2005 Thank you. I will try that later, running out of time atm. Share this post Link to post Share on other sites
void_false 1 Posted May 3, 2005 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> @fuel _helo < 0.2 _helo setvelocity [0,0,-100] Much simplier. Will force chopper hard land when he´s low on fuel. Share this post Link to post Share on other sites
Victor_S. 0 Posted May 3, 2005 Quote[/b] ] <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">@fuel _helo < 0.2_helo setvelocity [0,0,-100] Much simplier. Will force chopper hard land when he´s low on fuel. Your screwed if youve taken any previous damage though Share this post Link to post Share on other sites
Ex-RoNiN 0 Posted May 4, 2005 Why force it to land? You could just force a height of 5m or however much is required to get it to refuel EDIT: Like, have a repeating trigger around the refuel truck, and when the helo is in there and fuel < 0.5 (for example), then force flyinheight 5, something like that Share this post Link to post Share on other sites
Mr_Tea 0 Posted May 4, 2005 Thank you all for the input. I will try it out tomorow. Share this post Link to post Share on other sites