Jump to content
Sign in to follow this  
Mr_Tea

Heli on low fuel

Recommended Posts

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

Sure it's possible... but what do you mean by a free place?

Share this post


Link to post
Share on other sites

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

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

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

Thank you. I will try that later, running out of time atm. smile_o.gif

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 wow_o.gif

Share this post


Link to post
Share on other sites

Why force it to land? You could just force a height of 5m or however much is required to get it to refuel rock.gif

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

Share this post


Link to post
Share on other sites

Thank you all for the input. I will try it out tomorow. smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×