Jump to content

Epoch Helicopters Issues


FPSTrollywood

Recommended Posts

Anybody know if the Taru ATRQ issue has been resolved yet?

At 1.4 Arma3 now, but I am hesitant to try sling loading on a Taru.

Freaking Hurons are like hen's teeth, however.

This issue is not resolved.  Any time I slingload with a lift Taru, the ATRQ goes red.

 

No issue with other choppers and slingloading

Link to comment
Share on other sites

Yeah those guys going on about stress damage enabled are wrong... this happens even when you lift a go-kart and even without stress damage enabled.

I am looking forward to a fix for this... the heli that is supposed to be the best for lifting... actually ends up being the worst.

Link to comment
Share on other sites

worse thing about the helis is if you die in the drivers seat you cant see your own body after you reswarm but your team mates can, so if your playing on your own your stuffed

it's a feature - if you're playing alone, BI want to make you think you just had a deja vu.

you did not die due to a bug. it never happened. otherwise there should be a body, right?

 

joking aside I hate that bug. I hope it's fixed in 1.40!!

 

 

EDIT: FYI. I found this at Arma 3 bug tracker - it is an assigned & reopened issue:

 

"I was playing a mulitplayer match when I died and got a new chopper. The moment I entered the chopper all of them exploded and I died. It was like someone sabotaged them"

 

http://feedback.arma3.com/view.php?id=9311

Link to comment
Share on other sites

Sounds like it could be deserialization, I sometimes get similar. Get in a vehicle and try to move, engine noise goes off and no movement. 

 

I always keep a smoke shell for this, seems to sync the vehicle, you will see it 'jump' then settle.

 

Can't say I've had a chopper kill me, mozzie's is another matter, I can fly but damned if I don't nearly always end up in a tangled burning upside down mess with those. The key is gentle moves, if you brave enough to try :)

Link to comment
Share on other sites

One poster in BI bug tracker state "it happens ONLY when getting to the driver/pilot seat of vehicle first".

Therefore always getting in to another seat first and then switching to driver/pilot seat could be a good way of not blowing up (if it really works!).

 

I will try this.

Link to comment
Share on other sites

Just the other day (post 1.4) I climbed into the pilot seat of a heli parked on top of the base. When I exited, the heli blew up.

And I've noticed (on Chernarus in particular), that the heli's spawn in a few feet off the ground. As you approach a heli it drops a few feet to the ground.

Link to comment
Share on other sites

This issue is not resolved.  Any time I slingload with a lift Taru, the ATRQ goes red.

 

No issue with other choppers and slingloading

 

Real pain in the butt this issue. Reported it to the admins on my server unaware this was a problem across the game. You hook the vehicles and lift off no problem but as soon as you start to fly forward (carefully and controlled) that ATRQ pops sending you spiralling. Thankfully it has never killed me as somehow I still end up being able to land at trader or in a open field ;)

 

Defo needs a look at by either the epoch team or BIS if its arma related because the Huron is basically the only other with tow function but is rarer and without this issue.

Link to comment
Share on other sites

  • 3 weeks later...

It's been happening a lot on king of the hill, and its been happening befor 1.4 i believe. I'm assuming it's a bug in arma 3 but maybe theres something else going on behind the scenes. I noticed it happens mostly right after the new game session begins or the server restarts as well.

so by your own admission you're playing non-Epoch mods, eh? (ceasing your work on Ilanavis can be forgiven perhaps but playing other mods?!) I'll let LordAWOL know! :D

 

 

On topic:

Is this Still not resolved Iv been waiting for so long lol

No it's not resolved and I hate it but I don't think it will be resolved any time soon.

 

It's a bug since version 0.60 of Arma 3.

Last Update on bug tracker was on: 2014-03-17 15:51

The total weight of evidence that BI is working on this issue is: 0 [as per Bug Tracker link I gave above].

Link to comment
Share on other sites

  • 1 month later...

Hey, I have written a little script to deal with this issue until BI resolves it.

 

It is not perfect but works. The installation and configuration information is in the script.

 

Short description

 

    The damage is only disabled when the following conditions are true:
        - Player gets in pilot seat
        - AND The rope is attached to an object
        - AND the Taru's altitude is greater than _altitudeDisable
        - AND (
                the Taru's pitch is greater than the angle parameter or smaller than the angle parameter * -1
                OR the Taru's bank is greater than the angle parameter or smaller than the angle parameter * -1
        )
    Damage is re-enabled when the Taru is hit by bullets or projectiles

 

 

 OX3_Taru_SL_ATRQ_Lock.sqf

/*
	File: OX3_Taru_SL_ATRQ_Lock.sqf
	Author: ScaRR
	Date Created: 2 May 2015
	Date Updated: 4 May 2015
	Description: This is an attempt to fix the issue where the Taru's VRotor is damaged while lifting.
	This script could possibly be optimised a bit more. 
	The damage is only disabled when the following conditions are true:
		- Player gets in pilot seat 
		- AND The rope is attached to an object
		- AND the Taru's altitude is greater than _altitudeDisable
		- AND (
				the Taru's pitch is greater than the angle parameter or smaller than the angle parameter * -1 
				OR the Taru's bank is greater than the angle parameter or smaller than the angle parameter * -1 
		)
	Damage is re-enabled when the Taru is hit by bullets
	BE filters:
		scripts.txt
			on the allowDamage line append  !="_vHeli allowDamage false;" !="_vHeli allowDamage true"; !="_x allowDamage _allow;"
			on the addEvenHandler line append the following filters:
				!="_x addEventHandler [\"GetIn\", {_this call fn_HandleGetIn;}];" 
				!="_x addEventHandler ["\GetOut\", {_this call fn_HandleGetOut;}];" 
				!="_x addEventHandler [\"RopeAttach\", {_this call fn_HandleRopeAttach;}];"	
				!="_x addEventHandler ["\RopeBreak\", {_this call fn_HandleRopeDetach;}];"
				!="[] execVM \"scripts\OX3_Taru_SL_ATRQ_Lock.sqf\";"
			on the allMissionObjects line append:
				!="forEach  allMissionObjects \"O_Heli_Transport_04_F\",\"O_Heli_Transport_04_black_F\",\"O_Heli_Transport_04_EPOCH\";"
		setvariable.txt
			append !="RopeAttached" !="DriverIn" !="added_EHSL" !="SLHintState"
	Installation:
		Copy into your scripts folder, add this line to your init.sqf,  	[] execVM \"scripts\OX3_Taru_SL_ATRQ_Lock.sqf";
	Configuration:
		Change the _angle and _altitudeDisable to your liking in the fn_HandleSlVRotorDamage function
		Setting _showLight = true will turn on the heli's collision lights when protected and off when not
		Setting _showHint = true will display hints regarding the heli's protection status
	PLEASE KEEP CREDITS - THEY ARE DUE TO THOSE WHO PUT IN THE EFFORT!	
*/

if(!isServer) exitWith {};


fn_HandleHit = {
	private ["_this","_vHeli"];
	_vHeli = _this select 0;
	_vHeli allowDamage true;
};

fn_HandleRopeAttach = {
	private ["_this","_vHeli","_pilotIn"];
	_vHeli = _this select 0;
	_vHeli setVariable ["RopeAttached",true];
	_pilotIn = _vHeli getVariable "DriverIn";
		
	if(_pilotIn) then{
		_vHeli allowDamage false;
	};
};

fn_HandleRopeDetach = {
	private ["_this","_vHeli"];
	_vHeli = _this select 0;
	_vHeli setVariable ["RopeAttached",false];
	_vHeli setVariable ["SLHintState",0];
	_vHeli allowDamage true;
};

fn_HandleGetIn = {
	private ["_this","_vHeli","_pos"];

	_vHeli = _this select 0;
	_pos = _this select 1;
	
	if(_pos == "driver") then {
		_vHeli setVariable ["DriverIn",true];
		_vHeli setVariable ["SLHintState",0];
	};	
};

fn_HandleGetOut = {
	private ["_this","_vHeli","_pos"];
	_vHeli = _this select 0;
	_pos = _this select 1;
	if(_pos == "driver") then {
		_vHeli setVariable ["DriverIn",false];
		_vHeli setVariable ["SLHintState",0];
	};	
};


fn_HandleSlVRotorDamage = {
		private ["_this","_vHeli","_driverIn","_slingLoad","_pitch","_bank","_pitched","_angle","_allowDamage","_showHint","_hintState","_altitudeDisable","_aboveAlt","_showLight"];

		//Configurable option
		_angle = 3; //set the angle to your liking
		_showHint = true; //set to false to disable hint
		_altitudeDisable = 15; // altitude in meters below which protection is disabled
		_showLight = true; // turn collision lights on when protected  or off when not
				
		_vHeli = _this;
		
		_driverIn = _vHeli getVariable ["DriverIn",false];
		_slingLoad = _vHeli getVariable ["RopeAttached",false];
		_hintState = _vHeli getVariable ["SLHintState",0];
		
		_pitch = _vHeli call BIS_fnc_getPitchBank select 0;
		_bank = _vHeli call BIS_fnc_getPitchBank select 1;
		_pitched = false;
		_allowDamage = true;
		
		if((getPos _vHeli select 2) > _altitudeDisable) then {_aboveAlt=true;} else {_aboveAlt=false;};
		
		if(_driverIn && _slingLoad && _aboveAlt) then {
			if(_pitch > _angle || _pitch < (-1 *_angle)) then {
				_pitched = true;
			};
			if(_bank > _angle || _bank < (-1 * _angle)) then {
				_pitched = true; 
			};
			_allowDamage = !_pitched;
			
			if(!_pitched) then {_showHint};
			
			if(_showHint) then {
				if(_pitched && (_hintState != 1)) then {
					hint "ATRQ slingload lock engaged";	
					_hintState = 1;
				};
				
				if(!_pitched && (_hintState != 2)) then{
					hint "ATRQ slingload lock dis-engaged";	
					_hintState = 2;
				};
			};	
			
			if(_showLight) then {
				_vHeli setCollisionLight _pitched;
			};
			
		}
		else{
			
			if(!_aboveAlt && _driverIn && _slingLoad ) then {
				if(_hintState != 2) then {hint "ATRQ slingload lock dis-engaged";};
				if(_showLight) then {
					_vHeli setCollisionLight false;
				};
			};
			_hintState = 0;
		};
		
			
		_vHeli setVariable ["SLHintState",_hintState];
		
		_allowDamage
		
};

diag_log "OX3 - Taru slingload protection script loaded";
while {true} do 
{

	{
		if (!(_x getVariable ["added_EHSL",false])) then {
			
			_x addEventHandler ["GetIn", {_this call fn_HandleGetIn;}];
			_x addEventHandler ["GetOut", {_this call fn_HandleGetOut;}];
			_x addEventHandler ["RopeAttach", {_this call fn_HandleRopeAttach;}];
			_x addEventHandler ["RopeBreak", {_this call fn_HandleRopeDetach;}];
			_x setVariable ["added_EHSL",true];
		 };
		
		_allow = _x call fn_HandleSlVRotorDamage;
		_x allowDamage _allow;
		
	}forEach  allMissionObjects "O_Heli_Transport_04_F","O_Heli_Transport_04_black_F","O_Heli_Transport_04_EPOCH";
	
	uiSleep 1;

};  

 

Updated - added the option to turn on the collision lights when the ATRQ lock is enabled and added the Epoch version of the Taru to the helis to check and updated the BE filter in the description

Link to comment
Share on other sites

Hey, I have written a little script to deal with this issue until BI resolves it.

 

It is not perfect but works. The installation and configuration information is in the script.

<snip>

wow nice share! anyone tried this yet?
Link to comment
Share on other sites

  • 1 month later...

wow nice share! anyone tried this yet?

 

+1 - has anyone tried this yet?  

 

Players complain often on helos exploding and I have reproduced it once out of many attempts...

 

I suspected maybe anti-hack measures were causing the helos to explode, so I disabled the "antihack_Enabled" option in epochah.hpp, which I would like to turn back on so the Epoch admin abilities re-enable.  If "anithack_Enabled" is off, the Epoch native admin support also seems to turn off.

Link to comment
Share on other sites

Hey, I have written a little script to deal with this issue until BI resolves it.

 

It is not perfect but works. The installation and configuration information is in the script.

 

Short description

 

    The damage is only disabled when the following conditions are true:

        - Player gets in pilot seat

        - AND The rope is attached to an object

        - AND the Taru's altitude is greater than _altitudeDisable

        - AND (

                the Taru's pitch is greater than the angle parameter or smaller than the angle parameter * -1

                OR the Taru's bank is greater than the angle parameter or smaller than the angle parameter * -1

        )

    Damage is re-enabled when the Taru is hit by bullets or projectiles

 

 

 OX3_Taru_SL_ATRQ_Lock.sqf

/*
	File: OX3_Taru_SL_ATRQ_Lock.sqf
	Author: ScaRR
	Date Created: 2 May 2015
	Date Updated: 4 May 2015
	Description: This is an attempt to fix the issue where the Taru's VRotor is damaged while lifting.
	This script could possibly be optimised a bit more. 
	The damage is only disabled when the following conditions are true:
		- Player gets in pilot seat 
		- AND The rope is attached to an object
		- AND the Taru's altitude is greater than _altitudeDisable
		- AND (
				the Taru's pitch is greater than the angle parameter or smaller than the angle parameter * -1 
				OR the Taru's bank is greater than the angle parameter or smaller than the angle parameter * -1 
		)
	Damage is re-enabled when the Taru is hit by bullets
	BE filters:
		scripts.txt
			on the allowDamage line append  !="_vHeli allowDamage false;" !="_vHeli allowDamage true"; !="_x allowDamage _allow;"
			on the addEvenHandler line append the following filters:
				!="_x addEventHandler [\"GetIn\", {_this call fn_HandleGetIn;}];" 
				!="_x addEventHandler ["\GetOut\", {_this call fn_HandleGetOut;}];" 
				!="_x addEventHandler [\"RopeAttach\", {_this call fn_HandleRopeAttach;}];"	
				!="_x addEventHandler ["\RopeBreak\", {_this call fn_HandleRopeDetach;}];"
				!="[] execVM \"scripts\OX3_Taru_SL_ATRQ_Lock.sqf\";"
			on the allMissionObjects line append:
				!="forEach  allMissionObjects \"O_Heli_Transport_04_F\",\"O_Heli_Transport_04_black_F\",\"O_Heli_Transport_04_EPOCH\";"
		setvariable.txt
			append !="RopeAttached" !="DriverIn" !="added_EHSL" !="SLHintState"
	Installation:
		Copy into your scripts folder, add this line to your init.sqf,  	[] execVM \"scripts\OX3_Taru_SL_ATRQ_Lock.sqf";
	Configuration:
		Change the _angle and _altitudeDisable to your liking in the fn_HandleSlVRotorDamage function
		Setting _showLight = true will turn on the heli's collision lights when protected and off when not
		Setting _showHint = true will display hints regarding the heli's protection status
	PLEASE KEEP CREDITS - THEY ARE DUE TO THOSE WHO PUT IN THE EFFORT!	
*/

if(!isServer) exitWith {};


fn_HandleHit = {
	private ["_this","_vHeli"];
	_vHeli = _this select 0;
	_vHeli allowDamage true;
};

fn_HandleRopeAttach = {
	private ["_this","_vHeli","_pilotIn"];
	_vHeli = _this select 0;
	_vHeli setVariable ["RopeAttached",true];
	_pilotIn = _vHeli getVariable "DriverIn";
		
	if(_pilotIn) then{
		_vHeli allowDamage false;
	};
};

fn_HandleRopeDetach = {
	private ["_this","_vHeli"];
	_vHeli = _this select 0;
	_vHeli setVariable ["RopeAttached",false];
	_vHeli setVariable ["SLHintState",0];
	_vHeli allowDamage true;
};

fn_HandleGetIn = {
	private ["_this","_vHeli","_pos"];

	_vHeli = _this select 0;
	_pos = _this select 1;
	
	if(_pos == "driver") then {
		_vHeli setVariable ["DriverIn",true];
		_vHeli setVariable ["SLHintState",0];
	};	
};

fn_HandleGetOut = {
	private ["_this","_vHeli","_pos"];
	_vHeli = _this select 0;
	_pos = _this select 1;
	if(_pos == "driver") then {
		_vHeli setVariable ["DriverIn",false];
		_vHeli setVariable ["SLHintState",0];
	};	
};


fn_HandleSlVRotorDamage = {
		private ["_this","_vHeli","_driverIn","_slingLoad","_pitch","_bank","_pitched","_angle","_allowDamage","_showHint","_hintState","_altitudeDisable","_aboveAlt","_showLight"];

		//Configurable option
		_angle = 3; //set the angle to your liking
		_showHint = true; //set to false to disable hint
		_altitudeDisable = 15; // altitude in meters below which protection is disabled
		_showLight = true; // turn collision lights on when protected  or off when not
				
		_vHeli = _this;
		
		_driverIn = _vHeli getVariable ["DriverIn",false];
		_slingLoad = _vHeli getVariable ["RopeAttached",false];
		_hintState = _vHeli getVariable ["SLHintState",0];
		
		_pitch = _vHeli call BIS_fnc_getPitchBank select 0;
		_bank = _vHeli call BIS_fnc_getPitchBank select 1;
		_pitched = false;
		_allowDamage = true;
		
		if((getPos _vHeli select 2) > _altitudeDisable) then {_aboveAlt=true;} else {_aboveAlt=false;};
		
		if(_driverIn && _slingLoad && _aboveAlt) then {
			if(_pitch > _angle || _pitch < (-1 *_angle)) then {
				_pitched = true;
			};
			if(_bank > _angle || _bank < (-1 * _angle)) then {
				_pitched = true; 
			};
			_allowDamage = !_pitched;
			
			if(!_pitched) then {_showHint};
			
			if(_showHint) then {
				if(_pitched && (_hintState != 1)) then {
					hint "ATRQ slingload lock engaged";	
					_hintState = 1;
				};
				
				if(!_pitched && (_hintState != 2)) then{
					hint "ATRQ slingload lock dis-engaged";	
					_hintState = 2;
				};
			};	
			
			if(_showLight) then {
				_vHeli setCollisionLight _pitched;
			};
			
		}
		else{
			
			if(!_aboveAlt && _driverIn && _slingLoad ) then {
				if(_hintState != 2) then {hint "ATRQ slingload lock dis-engaged";};
				if(_showLight) then {
					_vHeli setCollisionLight false;
				};
			};
			_hintState = 0;
		};
		
			
		_vHeli setVariable ["SLHintState",_hintState];
		
		_allowDamage
		
};

diag_log "OX3 - Taru slingload protection script loaded";
while {true} do 
{

	{
		if (!(_x getVariable ["added_EHSL",false])) then {
			
			_x addEventHandler ["GetIn", {_this call fn_HandleGetIn;}];
			_x addEventHandler ["GetOut", {_this call fn_HandleGetOut;}];
			_x addEventHandler ["RopeAttach", {_this call fn_HandleRopeAttach;}];
			_x addEventHandler ["RopeBreak", {_this call fn_HandleRopeDetach;}];
			_x setVariable ["added_EHSL",true];
		 };
		
		_allow = _x call fn_HandleSlVRotorDamage;
		_x allowDamage _allow;
		
	}forEach  allMissionObjects "O_Heli_Transport_04_F","O_Heli_Transport_04_black_F","O_Heli_Transport_04_EPOCH";
	
	uiSleep 1;

};  

 

Updated - added the option to turn on the collision lights when the ATRQ lock is enabled and added the Epoch version of the Taru to the helis to check and updated the BE filter in the description

 

I tested this script today.  With this script I still blew up while getting into the pilot seat twice.

Link to comment
Share on other sites

This is the RPT log for 2 deaths (I 'x'ed out my ID):

 

20:53:08 Client: Object 3:7 (type Type_90) not found.
20:53:08 Client: Object 3:7 (type Type_91) not found.
20:53:08 Client: Object 3:7 (type Type_388) not found.
20:53:17 "playerDisconnected:xxxxxxxxxxxxxxxxxxxxx:Terd Fergasen"
20:53:17 Ragdoll - loading of ragdoll source "Soldier" started.
20:53:17 Ragdoll - loading of ragdoll source "Soldier" finished successfully.
20:53:25 "playerConnected:xxxxxxxxxxxxxxxxxxxx:Terd Fergasen"
20:53:26 No speaker given for Rahim Khalili
20:53:26 Performance warning: SimpleSerialization::Write 'sjygc' is using type of ',CODE' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types
20:53:26 Performance warning: SimpleSerialization::Read 'sjygc' is using type of ,'CODE' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types
20:53:27 Speaker Male03_F not found in CfgVoiceTypes
20:53:34 [VEMF]: AllowDamage Applied to 1 Units.
20:54:13 "ADMIN: Created crypto device for xxxxxxxxxxxxxxxxxxx with 0 at [13326.3,14590,1.85084]"
20:54:13 Client: Object 3:12 (type Type_91) not found.
20:54:13 Client: Object 3:12 (type Type_90) not found.
20:54:13 Client: Object 3:12 (type Type_388) not found.
20:54:19 "playerDisconnected:xxxxxxxxxxxxxxxxxxxxxxxx:Terd Fergasen"
20:54:24 "playerConnected:xxxxxxxxxxxxxxxxxxxxxxxxx:Terd Fergasen"
20:54:30 "A3EAI Monitor: Uptime: 0:7:7. FPS: 40.201. Active AI Groups: 9. Respawn Queue: 1 groups. HC Connected: false."
20:54:30 "A3EAI Monitor: Static Spawns: 1. Dynamic Spawns: 0. Random Spawns: 14. Air Patrols: 1. Land Patrols: 7."
20:54:56 No speaker given for Majeed Amin
20:54:56 Performance warning: SimpleSerialization::Write 'sjygc' is using type of ',CODE' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types
20:54:56 Performance warning: SimpleSerialization::Read 'sjygc' is using type of ,'CODE' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types
20:54:56 Speaker Male03_F not found in CfgVoiceTypes
 
 
---
 
The 3 lines with the following are weird...
 
20:53:08 Client: Object 3:7 (type Type_90) not found.
20:53:08 Client: Object 3:7 (type Type_91) not found.
20:53:08 Client: Object 3:7 (type Type_388) not found.
Link to comment
Share on other sites

+1 - has anyone tried this yet?  

 

Players complain often on helos exploding and I have reproduced it once out of many attempts...

 

I suspected maybe anti-hack measures were causing the helos to explode, so I disabled the "antihack_Enabled" option in epochah.hpp, which I would like to turn back on so the Epoch admin abilities re-enable.  If "anithack_Enabled" is off, the Epoch native admin support also seems to turn off.

 

The assumption of disabling the "antihack_Enabled" option in epochah.hpp is also incorrect, since I a helo still exploded with it turned off...

Link to comment
Share on other sites

I tested this script today.  With this script I still blew up while getting into the pilot seat twice.

 

Hi there,  this script is not for the getin explosions but for the Taru's heli rotor damage when you lift a vehicle.

 

I have another script for protecting the heli when a player gets into the pilot seat or when the heli's locality changes which can also cause it to explode. The script is in testing and seem to work. You are welcome to try it out and let me know if it works for you.

 

OX3_GetInProtect.sqf

 

/*
	File: OX3_GetInProtect.sqf
	Author: ScaRR
	Date: 2 June 2015
	Description: This script protects helis when a player gets close to a vehicles and the locality changes, at times this can cause a vehicle to explode or when the player 
	gets into the pilot seat.
	This script could possibly be optimised a bit more and needs further testing. 
	
	BE filters:
		
		setvariable.txt
			append !="added_EHProtect" !="GotIn" !="LocalChanged" 
	Installation:
		Copy into your scripts folder, add this line to your init.sqf, execVM \"scripts\OX3_GetInProtect.sqf";
	
		
	PLEASE KEEP CREDITS - THEY ARE DUE TO THOSE WHO PUT IN THE EFFORT!	
*/

if(isServer) exitWith {};

fn_GetTime = {
	private ["_time"];
	_time = parseNumber("micro_time" callExtension str diag_tickTime);
	_time
};

fn_handleGetIn = {
	private ["_vehicle","_seat"];
	_vehicle = _this select 0;
	_seat = _this select 1;
	
	if(_seat == "driver")then{
		_vehicle setVariable ["GotIn",true];
		//_vehicle setVariable ["GotInTime",call fn_GetTime];
		_vehicle allowDamage false;
		
	};
};


fn_handleLocal = {
	private ["_vehicle","_local"];
	
	_vehicle = _this select 0;
	_local = _this select 1;
	if(_local)then{
		_vehicle setVariable ["LocalChanged",true];
		_vehicle allowDamage false;
	};
};




diag_log "[OX3] - Vehicle get in pilot protection";
while {true} do 
{
	
	{	
		if (!(_x getVariable ["added_EHProtect",false])) then {
			
			_x addEventHandler ["GetIn", {_this call fn_handleGetIn;}];
			_x addEventHandler ["Local", {_this call fn_handleLocal;}];
			_x setVariable ["added_EHProtect",true];
		 };
		 
		 
		 
		 if( (_x getVariable["GotIn",false]) ||  (_x getVariable["LocalChanged",false])) then{
		 
			//_gotInTime = _x getVariable["GotInTime",0];
			//_now = call fn_GetTime;
			//diag_log format["OX3 - Got in step 2 %1 %2",_gotInTime,_now];
		//	if(_now > (_gotInTime + 5))then{
			sleep 3;
			_x allowDamage true;
			_x setVariable ["GotIn",false];
			_x setVariable ["LocalChanged",false];
			//_x setVariable ["GotInTime",0];
			//};
		 };
			
		
	}forEach vehicles;

		
	uiSleep 1;

}; 

 

Let me know how it goes. Hope it helps  :)

Link to comment
Share on other sites

Hi there,  this script is not for the getin explosions but for the Taru's heli rotor damage when you lift a vehicle.

 

I have another script for protecting the heli when a player gets into the pilot seat or when the heli's locality changes which can also cause it to explode. The script is in testing and seem to work. You are welcome to try it out and let me know if it works for you.

 

OX3_GetInProtect.sqf

 

/*
	File: OX3_GetInProtect.sqf
	Author: ScaRR
	Date: 2 June 2015
	Description: This script protects helis when a player gets close to a vehicles and the locality changes, at times this can cause a vehicle to explode or when the player 
	gets into the pilot seat.
	This script could possibly be optimised a bit more and needs further testing. 
	
	BE filters:
		
		setvariable.txt
			append !="added_EHProtect" !="GotIn" !="LocalChanged" 
	Installation:
		Copy into your scripts folder, add this line to your init.sqf, execVM \"scripts\OX3_GetInProtect.sqf";
	
		
	PLEASE KEEP CREDITS - THEY ARE DUE TO THOSE WHO PUT IN THE EFFORT!	
*/

if(isServer) exitWith {};

fn_GetTime = {
	private ["_time"];
	_time = parseNumber("micro_time" callExtension str diag_tickTime);
	_time
};

fn_handleGetIn = {
	private ["_vehicle","_seat"];
	_vehicle = _this select 0;
	_seat = _this select 1;
	
	if(_seat == "driver")then{
		_vehicle setVariable ["GotIn",true];
		//_vehicle setVariable ["GotInTime",call fn_GetTime];
		_vehicle allowDamage false;
		
	};
};


fn_handleLocal = {
	private ["_vehicle","_local"];
	
	_vehicle = _this select 0;
	_local = _this select 1;
	if(_local)then{
		_vehicle setVariable ["LocalChanged",true];
		_vehicle allowDamage false;
	};
};




diag_log "[OX3] - Vehicle get in pilot protection";
while {true} do 
{
	
	{	
		if (!(_x getVariable ["added_EHProtect",false])) then {
			
			_x addEventHandler ["GetIn", {_this call fn_handleGetIn;}];
			_x addEventHandler ["Local", {_this call fn_handleLocal;}];
			_x setVariable ["added_EHProtect",true];
		 };
		 
		 
		 
		 if( (_x getVariable["GotIn",false]) ||  (_x getVariable["LocalChanged",false])) then{
		 
			//_gotInTime = _x getVariable["GotInTime",0];
			//_now = call fn_GetTime;
			//diag_log format["OX3 - Got in step 2 %1 %2",_gotInTime,_now];
		//	if(_now > (_gotInTime + 5))then{
			sleep 3;
			_x allowDamage true;
			_x setVariable ["GotIn",false];
			_x setVariable ["LocalChanged",false];
			//_x setVariable ["GotInTime",0];
			//};
		 };
			
		
	}forEach vehicles;

		
	uiSleep 1;

}; 

 

Let me know how it goes. Hope it helps  :)

"while true do uisleep 1"

 

how does this impact FPS?

Link to comment
Share on other sites

"while true do uisleep 1"

 

how does this impact FPS?

 

I haven't noticed any performance issues or significant FPS drop. Haven't tested it that much but it runs and I haven't had complaints. Any suggestions / recommendations on code improvements are welcome  :)

You could easily increase the sleep time and it should be fine and would probably be a good idea but needs testing.

Link to comment
Share on other sites

I haven't noticed any performance issues or significant FPS drop. Haven't tested it that much but it runs and I haven't had complaints. Any suggestions / recommendations on code improvements are welcome  :)

You could easily increase the sleep time and it should be fine and would probably be a good idea but needs testing.

 

Thank you, ScaRR.  I will test it today.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...