Jump to content
Sign in to follow this  
freddern

Request: Decent tailrotor failure script

Recommended Posts

Hello...

I have tried some tailrotor scripts for Flashpoint, but they do not seem to work for Arma.

Does anyone know about any?

It would be cool if someone could show me how to make it look as if the chopper is hit by an RPG but it only damages the helicopter -> some survive/ some don't (with a nice explosion and stuff) that would have been cool.

xmas_o.gif

Share this post


Link to post
Share on other sites

Why? Arma has an integrated Tailrotor failure function. Try shooting at the tailrotor and u will see

Share this post


Link to post
Share on other sites

Okey... so is there any way to set that tailrotor function off by using a trigger then...?

Share this post


Link to post
Share on other sites

I think he means not to turn it off, but trigger it at will somehow.

Probably for a cutscene?

Share this post


Link to post
Share on other sites

1st question would be, have you ever looked in a config.ini (config.bin) file of an addon ? If no, reading on wont make much sense....

All the info about what characteristics each unit can do is outlined in its config.ini file. This would include the tail rotor failure build into the chopper already. If its a script it will be as simple to use as the scripts included in the BAS chopper from OFP. You'll need a little know OFP scripting know how, but certainly not expert level. And back up any files you open or edit....

(if when you open the pbo, and its config.bin instead of config.ini, you'll need to convert it... i dont know if the OFP converters will work with arma )

Share this post


Link to post
Share on other sites

i would really need this too, to get the tail rotor to fail while the players group is inside for a mission i am planing when i get the game, this in advanced would be great.

Share this post


Link to post
Share on other sites
Have you tried simply using setdammage?

i was just about to come and post.. i have been testing about just make a trigger like and add

Heli1 Setdamage 0.7 or 0.5 and the tail rotor will fail...

0.8 = Full Tail Rotor Damage

0.5 = Light Tail Rotor Damage

Share this post


Link to post
Share on other sites

As I suspected. tounge2.gif

The tail rotor speed is directly dependent on the chopper's damage, just like in Elite. I noticed that even a little bit of damage caused it to slow down a bit and make you spin ever so slightly.

Share this post


Link to post
Share on other sites

Thing is though, if you set your damage to 0.8, when you hit the ground after the spinout you WILL explode. I tried actually shooting out the tailrotors and it takes less than two magazines from an M4, and when I got back in the blackhawk the actual helo was fine, just the rotor was screwed.

If there's a way to induce this without setting your damage to 0.8 or 0.5, i'd love you forever. At the moment my mission works around this by simulating a fuelleak.

Share this post


Link to post
Share on other sites

You can try this code, i got it to work in ArmA, its original ment for OFP. I believe the original was from MrZigs but i am not sure.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

;;-----------------------------------------

;;[heli,true,2] exec "rotor.sqs"

_heli = _this select 0

_ox = 0

_oy = -9.5

_h = 0

_size = 2

;;-----------------------------------------

_speedX = velocity _heli select 0

_speedY = velocity _heli select 1

_driver = driver _heli

_heli setfuel 0

_random = true

_maxkills = 4

?count _this == 2: _random = _this select 1; _maxkills = 4

?count _this == 3: _random = _this select 1; _maxkills = _this select 2

#loop

~0.001

_param=(random 3)*_size

?(_param>1.5):_param=random 2.5

?(_param<0.95):_param=0.95+_param

?(_size<1):_param=random 0.75

? (speed _heli)>15:_param=_param/2

_heli setvelocity [_speedX,_speedY,-14]

_height = getpos _heli select 2

_dir = getdir _heli

_heli setdir (_dir) +5.5

?getpos _heli select 2 <= 1 : goto "loop2"

goto "loop"

#loop2

_dir = getdir _heli

_heli setvelocity [0,0,-10]

_heli setdir (_dir) +5.5

#explo

_c = 50

_size = [2, 5]

_size1 = [2, 15]

_lifetime = 3

_step = 360 / _c

_i = 0

#11

_Explosion = GetPos _heli

_cx = _Explosion select 0

_cy = _Explosion select 1

_cz = _Explosion select 2

_vel = [sin(_i * _step)*(random 15-random 15), cos(_i * _step)*(random 15-random 15), random 20]

_vel1 = [sin(_i * _step)*7.5, cos(_i * _step)*7.5,random 5-random 15]

_i = _i + 1

?(_i < _c) : goto "11"

#crew

?!_random: goto "run"

_crew = crew _heli

_c = count _crew

_i = 0

_kills = 0

#crew2

_unit = _crew select _i

?random 1 > 0.8 && _unit != player: _unit setdammage (random 1)

?random 1 > 0.8 && _unit != player && _kills < _maxkills: _unit setdammage 1; _kills = _kills + 1

_i = _i + 1

?_i < _c: goto "crew2"

#run

_crew = crew _heli

?!Alive _heli : exit

_heli setdammage .95

{unassignvehicle _X} foreach _crew

{_X setbehaviour "aware"} foreach _crew

?player in _crew : titletext ["Is everyone OK!?","plain"]

exit

I commented the lines which have drop cl_basic and such, because that gave me some errors and i believe its only the tailrotor smoke.

*edit*

Ok never mind i edited those lines out of it, and you should start the script as this:

[heli,true,2] exec "rotor.sqs"

2 means that a random number between 0 and 2 AI people in the helicopter will be killed during the crash

Share this post


Link to post
Share on other sites

For me it says that an expected array wasn't found or something, and it was to do with countcrew == 3 i think.

I'm saving the script as "rotor.sqs" and naming my helo "heli" and putting that script into the init field (this exec "rotor.sqs")

Share this post


Link to post
Share on other sites
(this exec "rotor.sqs")

Remove the curve brackets. Should be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this exec "rotor.sqs"

Share this post


Link to post
Share on other sites

Ok, this tailrotor script is a little dodgy. The way the thing rotates is a little wierd and when it hits the ground it usually just blows up anyway. I changed the setdammage thing from 0.95 to 0 and also removed the "is everyone alright!?" thing.

Someone mentioned spawning a bunch of bullets at the tail. how does one do that?

The best I can come up with here is the UH60's setdammage at 0.6 to begin with, then 8 seconds in set the dammage to 0.7, and then at 14 0.8 whilst draining out the fuel. Unfortunately this makes the bird hard to make survive on impact wth the ground (however a good pilot should be able to keep it steady)

Share this post


Link to post
Share on other sites

Nobody then? Oh well.

Another thing I'd like to do, is to have an enemy patrol in either a UAZ or a BMP2 drive to the crashsite. I was thinking of having a marker spawn on the UH60's crash site (I mean it could be ANYWHERE), and then order the enemy to move to that location, but I dunno how to do this.

Also i'd like to deprive the stranded UH60 crew of a map, so that the rescue is a little harder. Anyone know how?

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  

×