Jump to content
Sign in to follow this  
demonhunter212

Black Hawk Down Script

Recommended Posts

Where can i find that black hawk script where the tail rotor fails and it crashes? smile_o.gif

You could make your own with a setdir loop (to make it spin) and an order to cut-power to the engines or simply kill the pilot smile_o.gif

Share this post


Link to post
Share on other sites

Here's one by Vektorboson:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; tail-rotor fail script by Vektorboson

; SYNTAX

; [CHOPPER, <RANDOMKILLS, MAXKILLS>] exec "effects\tailrotor.sqs"

; CHOPPER is the helicopter

; RANDOMKILLS is either true or false (random people are killed)

; MAXKILLS is maximum of randomkills

_heli = _this select 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

; Position of helicopter engine (adjust this for different helicopters!)

_enginePos = [0, -3, 1]

drop ["cl_fire", "", "Billboard", 1, 1, _enginePos, [0,-3,1], 0, 1, 1, 0.001, [1,5], [[1,1,1,1],[1,1,1,0]], [0], 0.1, 0.2, "", "", _heli]

~0.05

drop ["cl_fire", "", "Billboard", 1, 1, _enginePos, [0,-3,1], 0, 1, 1, 0.001, [1,5], [[1,1,1,1],[1,1,1,0]], [0], 0.1, 0.2, "", "", _heli]

~0.02

drop ["cl_fire", "", "Billboard", 1, 1, _enginePos, [0,-3,1], 0, 1, 1, 0.001, [1,5], [[1,1,1,1],[1,1,1,0]], [0], 0.1, 0.2, "", "", _heli]

_AddDir = 0.1

~(random 1)

#loop

_dir = getDir _heli

?_AddDir < 5: _AddDir = _AddDir + 0.05

_heli setDir (_dir + _AddDir)

_v = Velocity _heli

_heli setVelocity [((_v select 0) / 1.0001), ((_v select 1) / 1.0001), -5]

drop ["cl_basic", "", "Billboard", 7, 7, _enginePos, [0,0,0], 0, 1, 1, 0.001, [1,5], [[0,0,0,0],[0,0,0,0.7],[0,0,0,0]], [0], 0.1, 0.2, "", "", _heli]

~0.01

?getPos _heli select 2 < 10: _heli setFuel 0

?getPos _heli select 2 > 2: goto "loop"

?alive _heli: _heli setDammage 0.8

?!alive _heli: exit

_v = Velocity _heli

_heli setVelocity [((_v select 0) / 1.001), ((_v select 1) / 1.001), -5]

?!_random: exit

; now the randomkills

_crew = crew _heli

_c = count _crew

_i = 0

_kills = 0

#crew

_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 "crew"

Share this post


Link to post
Share on other sites

First you gotta save the mission from the editor, directory will be created for it, something like ofp\users\username\missions\missionname.island. Save the script as tailrotor.sqs to that dir. Run it from trigger OnActivation field like this: [nameofheli] exec "tailrotor.sqs";

Share this post


Link to post
Share on other sites

If I do this correctly will I be able to use this script in any mission i want to?

And when you say an SQS file do you mean as in Notepad or something?

Share this post


Link to post
Share on other sites

Thx Metal Heart but is there any possible way for the Helicoptor to blow up when it hits the ground?

Because everytime i use this script the Helicoptor spins then touches down and everyone is fine.

Share this post


Link to post
Share on other sites

you can use the random kills like [heliname, true, 5] exec "tailrotor.sqs"; (maximum of 5 passengers would be killed) or destroy it completely by adding _heli setdammage 1; to the end of the script.

Share this post


Link to post
Share on other sites

Ok thx but im really a noob do you want me to put that in any "On Activation" boxes or stuff like that or into the "Tailrotor.sqs" file?

when you say destroy the helicoptor completely do you mean as in its destroyed before it hits the ground or it blows up when it impacts into the earth.........Srry for all the hassle! wink_o.gif

Share this post


Link to post
Share on other sites

Put the _heli setdammage 1; to the end of the tailrotor.sqs and the heli will explode when it hits the ground. You can also try what happens if you put it somewhere earlier in the script, it might prevent the rotation though.

Share this post


Link to post
Share on other sites

Is it possible for me to use this in any mission i want to other than having to drag the tailrotor.sqs file into each and everyone?

Share this post


Link to post
Share on other sites

Well of course. Just copy and paste the script to the mission directory and you can use it with exec.

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  

×