Home   Help Search Login Register  

Author Topic: Black Hawk Down  (Read 2459 times)

0 Members and 1 Guest are viewing this topic.

Offline Hoop

  • Members
  • *
Black Hawk Down
« on: 07 Sep 2007, 22:36:55 »
I would like to have it to where a Black Hawk helicopter reaches a Waypoint then once he reaches it i would like for it tail rotor to fail and spin out using this script how do i do this ?

Code: [Select]
; ****************************************************************
; Script file for Armed Assault
; Created by: TODO: Author Name
; ****************************************************************

; 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.001), ((_v select 1) / 1.001), -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 > 2: goto "loop"

?alive _heli: _heli setDammage 0.8; _heli setFuel 0
?!alive _heli: exit

?!_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"
« Last Edit: 08 Sep 2007, 00:50:50 by Planck »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Black Hawk Down
« Reply #1 on: 08 Sep 2007, 00:31:53 »
save the script (that text) as tailrotor.sqs in your mission folder. The, in the waypoint activation field put
Code: [Select]
[yourchoppername] exec "tailrotor.sqs"

But before that, change all cl_fire by \ca\data\cl_fired and all cl_basic by \ca\data\cl_basic.

Offline Hoop

  • Members
  • *
Re: Black Hawk Down
« Reply #2 on: 08 Sep 2007, 01:16:02 »
Ok but do you know the engine position for the tail rotor on the black hawk ?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Black Hawk Down
« Reply #3 on: 08 Sep 2007, 01:24:38 »
A bit try and error cannot be so hard.

Offline Hoop

  • Members
  • *
Re: Black Hawk Down
« Reply #4 on: 08 Sep 2007, 04:05:14 »
im a n00b wen it comes to scripting so what numbers do i edit ?

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Black Hawk Down
« Reply #5 on: 08 Sep 2007, 06:12:53 »
Code: [Select]
_enginePos = [0, -3, 1]
You need to play with these numbers.  :)
Xbox Rocks

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Black Hawk Down
« Reply #6 on: 08 Sep 2007, 10:13:54 »
and the neaming of them is:
_enginePos = [left-right, backward-forward, down-up]

for example [1, -6, 2] means 1m to the right of the chopper center, 6 meters back and 2 over chopper's center.

Offline Hoop

  • Members
  • *
Re: Black Hawk Down
« Reply #7 on: 08 Sep 2007, 23:58:42 »
Ok thank you i will try it out :)

Offline Hoop

  • Members
  • *
Re: Black Hawk Down
« Reply #8 on: 09 Sep 2007, 00:52:42 »
Ive tried and tried but i cant seem to find the corect measurements could someone give me a little help but if not i understand thank you

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Black Hawk Down
« Reply #9 on: 09 Sep 2007, 18:16:21 »
Well the first number will be 0 since the engine isnt left or right of the aircraft, its centered. The 2nd number will be positive to go forward from the center of the aircraft, which probably isnt what you want, or a negative number for the position to be behind the center of the object. The third number is the height above center, if its negative it will be below.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Black Hawk Down
« Reply #10 on: 08 Dec 2008, 09:34:00 »
Has anyone found out the correct position of the tail rotor?
TS3 IP: tor.zebgames.com:9992

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Black Hawk Down
« Reply #11 on: 08 Dec 2008, 14:46:36 »
Not really, but, looking quickly in O2 I estimate it is approximately (0,-9.6,2)

That would be centered in X, -9.6 in Y and 2 above in Z........approx.


Planck
I know a little about a lot, and a lot about a little.

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: Black Hawk Down
« Reply #12 on: 09 Dec 2008, 22:01:44 »
Try messing with modeltoworld values, and then placing particles at those points.

Then tweak accordingly.

Luke
Pesky Human!!
Wort Wort Wort.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Black Hawk Down
« Reply #13 on: 10 Dec 2008, 06:28:54 »
I just tried it out, and this worked well for me:

Code: [Select]
_enginePos = [0, -6.6, .55]
Of course you must also replace this text as Mandoble stated in the second post:

Quote
But before that, change all cl_fire to \ca\data\cl_fired and all cl_basic to \ca\data\cl_basic.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...