Jump to content
Sign in to follow this  
SinBad1956

AI Piloted Helo Engine Starts Then Stops

Recommended Posts

Here are my setup conditions:

Plain Arma 3 Beta multi-player mission vanilla map with nothing but the below in it...

1. Player

2. MH-9 Helo (chopper1) with AI piloting.

3. Chopper on the ground with "chopper1 setFuel 0;" in the init box.

4. Waypoints set in a circle. All "move", except last one which is "cycle".

5. Radio trigger LINKED to 1st waypoint.

- Type: Switch

- Condition: Player in chopper1;

- On Activation: chopper1 Setfuel 1; chopper1 engineOn true; chopper1 flyinHeight 15;

Works great in the editor during 'Preview' but on the server, the player gets in chopper 1, uses the radio to start the chopper, the chopper starts like it's getting ready to take off with blades moving, then the engine turns off.

If I take "Player in chopper1" out of the trigger activate and just put in "this" it works on server.

Any ideas? The goal here is not to start up chopper1 by using the radio unless that player is actually in chopper1.

thanks

//SinBad

Edited by SinBad1956

Share this post


Link to post
Share on other sites

Take the radio out of it entirely.

Player

MH-9 AI

Waypoints set in a circle FIRST waypoint is a MOVE waypoint right past the nose of the heli, all the rest MOVE except for a CYCLE near the SECOND MOVE waypoint so it links.

Type SWITCH - Activation NONE trigger condition of player in chopper1. OnAct chopper1 flyInHeight 15;

Synchronize (F5) the trigger with the first MOVE waypoint next to the chopper.

MH-9 waits for the player to get in, then starts the cycling waypoints. No need for a radio, turning on the engine or messing with fuel.

Edited by kylania
These forums are unusably slow today, what's going on?

Share this post


Link to post
Share on other sites

Thanks for the reply. I guess I should have said that there will be multiple players in the mission and some, but not all, will be getting into chopper1 I suspect. So we would wait for all who wanted to get in, to do so. I want to start of the chopper manually if we have to wait a bit. If it was only a single player, yes your suggestion would work.

//SinBad

Edited by SinBad1956

Share this post


Link to post
Share on other sites

Why not just have the players fly the helicopter themselves if that's the case? Involving AI when there doesn't need to be any is always a chore.

You can just change the trigger to be a radio trigger instead. Really though, sounds like you should just have a player fly. :)

Share this post


Link to post
Share on other sites

I will be using the AI chopper as transport to drop divers off the coast then return to get anyone at base. Yes, I know there is a transport module but do not want to use it. Trying to keep it simple. The question is here, why does the chopper start then stop? Doesn't make sense.

//SinBad

Share this post


Link to post
Share on other sites

If that's what you need then taking off is the least of your worries. The start/stop might be the fact that the player is fueling an AI controlled by the server? Not sure really. The transport module really is the best solution for this, having to hand code it all is gonna get crazy, especially if you want it to work for any number of players on demand. No need to reinvent the wheel when it already exists.

Share this post


Link to post
Share on other sites

So no one knows why or how to keep the chopper's engine running? I've even simplified it by removing everything except the chopper and trigger, then just to have the engine start upon radio activation. Still doesn't work with "Player in chopper1" as the condition. The engine starts up and then just stops.

Help please!

//SinBad

Share this post


Link to post
Share on other sites

I tried setting it up in they way you have it in the first post and it works fine, same for using Player in chopper1

That was in single player mode so it looks like it could be a MP issue which is something I can't get my head around.

Example player in chopper1 you are in the chopper but other players aren't so you have one trigger that is true and others that are false.

In single player you don't need the fuel or the engineon commands, try in in SP first and then try MP, you need to pinpoint the issue.

Share this post


Link to post
Share on other sites

As kylania said you will want to (even though the WIKI says the commands are global) run the commands for the helicopter where it is local i.e the server.

Heres a version i put together using addAction, using inv_heliPads and scripting the waypoints and using bis_fnc_mp to enable/disable the helicopter. It works perfectly fine on a dedicated server, only problem is, even though i have the pilot set up as disableAI TARGET and AUTOTARGET and also set as captive, he will go between the two points as many times as i like but if the helicopter accidentally gets hit by enemy fire because they were aiming at me when getting out/in the chopper, next time he takes off he will go strafe running the enemy units :/ :(. Even placing a HandleDamage EVH on the helicopter make no difference, thought they may have been caused to react through receiving damage.

Anyway take a look may help you out. Test Mission

Share this post


Link to post
Share on other sites

Thanks Larrow, I briefly looked at the mission and yes, it works. Doesn't matter to me if its a radio or via addAction. I will definitely try to get that working in my mission.

As for your issue, I have a rescue chopper come in and perform an extract which is the same type chopper you are using and it doesn't care if it is getting shot or what ever, doesn't shoot back. Just lands and waits for the extract.

I created a script called nofear.sqf

rescue1 disableAi "TARGET";

rescue1 disableAi "AUTOTARGET";

rescue1 enableAttack false;

rescue1 setCombatMode "BLUE";

rescue1 setBehaviour "STEALTH";

rescue1 allowFleeing 0;

rescue1 allowDamage false;

driver rescue1 allowDamage false;

rescue1 addEventHandler ["SetDamage", {false}];

{_x allowDamage false} foreach (crew rescue1);

I put this line in the chopper's init: Script_Handler = execVM "nofear.sqf";

Thanks again everyone for your help and I'll let you know how it goes...

//SinBad

Share this post


Link to post
Share on other sites

Just to conclude, Larrow's script works like a charm. I took out the addwaypoint stuff and just used the waypoints created with the mission editor. Thanks all ...

//SinBad

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  

×