Jump to content
Sign in to follow this  
meester

AI Pilot Stops Engine When Squad Approaches Aircraft

Recommended Posts

But I want the engine to stay running. Im not exactly sure how to go about this as other topics don't seem to give me what I need.

How would I make an ai pilot keep the engine running without the nearest squad interupting it by boarding? Triggers or something simpler?

Edited by Meester

Share this post


Link to post
Share on other sites

There's no real way to get the AI to keep the engine running AFAIK, but you can make it so that they immediately turn it back on whenever it goes off using the "engine" event handler. Add the following to the init field of the vehicle you wish to monitor:

this addEventHandler ["engine",{if !(_this select 1) then {driver (_this select 0) action ["engineOn",(_this select 0)]}}]

I'm haven't tested this, but I suppose it might work for you.

Share this post


Link to post
Share on other sites

Thanks but I managed it like this - !(isEngineOn CoalR); in trigger condition and CoalR engineOn true; on, on act. Activation is blufor, its on repeatedly and Present.

{CoalR being the vehicles name]

Its possible there is a tiny noticable stutter of the engine but it will probably only matter for a perfectionist if its even there.

Edited by Meester

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  

×