Forum Jump :

Author Message

pers  



Posts: 2
Rank:


Level: Member

Country: au
Location:
Occupation: Professional Pizza Eater
Age:
In-game name:

 
#1 Posted at 2014-10-07 15:43        
     
Hello,

Can someone advise on how to code a script to take out a helicopter tail rotor during flight, preferably on demand (via radio command etc.)?

I've seen this one...Survivable Heli Crash script..

However that does enough damage to destroy the heli on landing. Perhaps it can be modified to suit my purposes? What I am looking for is a script to disable or take out the tail rotor during practice scenarios, specifically for purposes of practicing autorotating (with main rotor intact). I'd like to be able to use it on various helis as well (Pawnee and Hellcat initially), and be able to repair the heli on successful landing.

Thanks in advance for any assistance.

pers

This post was edited by pers (2014-10-07 15:54, ago)


Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 33
In-game name: Tajin

 
#2 Posted at 2014-10-07 16:27        
     
(Untested) I think it should be this. Though I'm not 100% sure about the hitpoint name.

yourChopper setHitPointDamage ["HitVRotor", 1.0];

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Advertisement


Author Message

pers  



Posts: 2
Rank:


Level: Member

Country: au
Location:
Occupation: Professional Pizza Eater
Age:
In-game name:

 
#3 Posted at 2014-10-13 08:20        
     
# Tajin : (Untested) I think it should be this. Though I'm not 100% sure about the hitpoint name.

yourChopper setHitPointDamage ["HitVRotor", 1.0];

Thanks I'll give that a go.


Author Message

Zriel  



Posts: 5
Rank:


Level: Member

Country: es
Location:
Occupation:
Age: 29
In-game name: Zriel

 
#4 Posted at 2014-10-29 17:27        
     
have a look at this, we are currently using it in our Academy
Functions Air Academy
First you will have to precompile the SQF, to get 2 functions.
fnc_aca_actions will add several new actions when called via an action,
fnc_aca_aire will do the actual work.

So, you have to add this in the init of the vehicle
this addAction [("<t color=""#D13DCF"">" + "Activate Instructor mode" + "</t>"), "[_this select 0, _this select 2] spawn fnc_aca_actions", [], 3, false, true, "", "player in _target"];

It will add an action called "Activate Instructor Mode", which will add several actions later,

_ids set [0,_vehicle addAction [("<t color=""#D69CD5"">" + "light damage tail rotor" + "</t>"), "[_this select 0, 1] spawn fnc_aca_aire", [], 3, false, true, "", "(player in _target)"]];
_ids set [1,_vehicle addAction [("<t color=""#D69CD5"">" + "full damage tail rotor" + "</t>"), "[_this select 0, 2] spawn fnc_aca_aire", [], 3, false, true, "", "(player in _target)"]];
_ids set [2,_vehicle addAction [("<t color=""#D69CD5"">" + "Full damage main rotor" + "</t>"), "[_this select 0, 3] spawn fnc_aca_aire", [], 3, false, true, "", "(player in _target)"]];
_ids set [3,_vehicle addAction [("<t color=""#D69CD5"">" + "Disable damage" + "</t>"), "[_this select 0, 4] spawn fnc_aca_aire", [], 3, false, true, "", "(player in _target)"]];
_ids set [4,_vehicle addAction [("<t color=""#D69CD5"">" + "Enable damage" + "</t>"), "[_this select 0, 5] spawn fnc_aca_aire", [], 3, false, true, "", "(player in _target)"]];
_vehicle addAction [("<t color=""#D13DCF"">" + "Deactivate instructor mode" + "</t>"), "[_this select 0, 6] spawn fnc_aca_aire", [], 3, false, true, "", "(player in _target)"];

You will have to edit a bit the script (when removing the actions again, it adds 2 more that we use, for repairing/refueling, and deleting the vehicle). But I think it's a good start.