Jump to content
Sign in to follow this  
DmitryJDM

Engine immobilizer for helicopter

Recommended Posts

How to block the launch of the helicopter engine is a pilot and gunner sit in it?

Option with retracting fuel and engine failure is not suitable.

 

Sorry for google translator.

Share this post


Link to post
Share on other sites
driver heli1 enableSimulation false;

This freezes animation of pilot, so its an immersion breaker if players are likely to be looking at pilot.   But it will keep him from turning engine on.  You can renable simulation for pilot later per script or trigger logic.

 

For bigger choppers where pilots are separated from cargo units, it may not be noticeable by player.

Share this post


Link to post
Share on other sites
23 hours ago, johnnyboy said:

driver heli1 enableSimulation false;

This freezes animation of pilot, so its an immersion breaker if players are likely to be looking at pilot.   But it will keep him from turning engine on.  You can renable simulation for pilot later per script or trigger logic.

 

For bigger choppers where pilots are separated from cargo units, it may not be noticeable by player.

This is not exactly what I wanted.

The pilot and gunner are players

So that this option does not suit me, there are ideas?

Share this post


Link to post
Share on other sites
4 minutes ago, dimas1k said:

This is not exactly what I wanted.

The pilot and gunner are players

So that this option does not suit me, there are ideas?

heli1 addEventHandler ["Engine", {if (_this select 1) then {(_this select 0) engineOn false}}]

Share this post


Link to post
Share on other sites
1 minute ago, theend3r said:

heli1 addEventHandler ["Engine", {if (_this select 1) then {(_this select 0) engineOn false}}]

 

Its work in MP?

initServer.sqf

//--- Block heli engine
DMSK_Mi28N addEventHandler ["Engine", {if (_this select 1) then {(_this select 0) engineOn false}}];

/*-------------------------------------------------------------------------------------------------
Start mission
-------------------------------------------------------------------------------------------------*/

//--- task 1
"task1" call BIS_fnc_missionTasks;
"task1" call BIS_fnc_taskSetCurrent;

//--- wait 1 task
if !(isDedicated) then {waitUntil {count simpleTasks player > 0}};

//--- task2
[] spawn {
	waitUntil {sleep 3; {_x in DMSK_Mi28N} count (units group player) == {alive _x} count (units group player)};
	DMSK_Mi28N removeEventHandler ["Engine", 0];
	DMSK_Mi28N lock true;	
	["task1", "Succeeded"] call BIS_fnc_taskSetState;

	"task2" call BIS_fnc_missionTasks;
	"task2" call BIS_fnc_taskSetCurrent;
};

or it should be replaced by addMPEventHandler?

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  

×