Jump to content
Sign in to follow this  
HateDread

Scripting Tail Rotor Fail?

Recommended Posts

Anybody know of a way to force the tail rotor to fail as determined by a trigger? It would need to stay at full health, so setdamage doesn't work - if I use this, the chopper rarely survives the impact of the hard landing.

I know I can disable the main rotor with setfuel 0, but that isn't what I'm after.

Cheers, guys!

Share this post


Link to post
Share on other sites
setHit should do the trick. Now you just have to find out the name of the tail rotor selection in the model.

Share this post


Link to post
Share on other sites

How would I about implementing such things? Do I use something like 'backRotorSpeed = 0', in the init somehow? this backRotorSpeed = 0 doesn't work, as expected.

Any ideas?

Share this post


Link to post
Share on other sites

It's even in the examples for sethit.

Apa setHit ["mala vrtule", 1];

There you have your "Black hawk down" thingy laid out for you hehe! :)

Share this post


Link to post
Share on other sites

Thanks, that worked! What is 'mala vrtule'?

Also, this is for a heli the AI is controlling. Is there any way to make the landing more dramatic? The pilot just stuffs about then casually lands.

Share this post


Link to post
Share on other sites

Description: Damage / repair part of object. Damage 0 means fully functional, damage 1 means completely destroyed / dead. Note: Some part names are in Czech; see translation table.

For the dramatic part, I don't know.

I tried killing the pilot, but that didn't help either as the helicopters in arma is very sturdy, diving down from 50 meters into the ground doesn't destroy them, and obviously having a none working tail rotor doesn't affect the flight model as much.

Perhaps it could be scripted too, with setting velocity and bank of the helicopter.

Share this post


Link to post
Share on other sites

For a more dramatic look, it seems having the helicopter moving at full speed, with this in a trigger, once it gets moving;

H1 setHit ["mala vrtule", 0.95]; H1 setfuel 0; H1 engineon false;

(Where H1 is heli name).

How can I make the sidegunners hold their fire? I've set this in the heli init field;

Heli = group this; Heli setcombatmode GREEN;

But no luck.

Any ideas?

---------- Post added at 05:16 PM ---------- Previous post was at 05:15 PM ----------

For a more dramatic look, it seems having the helicopter moving at full speed, with this in a trigger, once it gets moving;

H1 setHit ["mala vrtule", 0.95]; H1 setfuel 0; H1 engineon false;

(Where H1 is heli name)

How can I make the sidegunners hold their fire? I've set this in the heli init field;

Heli = group this; Heli setcombatmode GREEN;

But no luck.

Any ideas?

EDIT: Moving full speed + that code usually results in a crash. I now run heli at normal speed.

In addition to above questions, how can I tell that the heli has hit the ground, as a condition in a trigger? What's the command for height? And how do I say 'less than blah blah' with that, in a command?

Cheers.

Edited by HateDread

Share this post


Link to post
Share on other sites

So I am trying to add an explosion to this via

bomb = "PG7VR" createVehicle getPosATL HeliO; HeliO setHit ["mala vrtule", 0.95]; HeliO setfuel 0; HeliO engineon false; 

in the OnAct of a trigger. The trigger activates but everything except the explosion happens. Any ideas?

Share this post


Link to post
Share on other sites

Try using "ARTY_Sh_105_HE" as the weapon spawned. That usually works for artillery - might explode well enough on contact with heli?

Share this post


Link to post
Share on other sites
Try using "ARTY_Sh_105_HE" as the weapon spawned. That usually works for artillery - might explode well enough on contact with heli?

That works, but there is a good 3 second delay and it doesn't explode at the choppers Z position, just X and Y, which is not what I was wanting. Any suggestions on getting the explosion to be ON the helicopter, basically?

Share this post


Link to post
Share on other sites

Maybe spawning it then attachto? So it detonates ON the heli's position? Not too sure, mate. If you find out, please tell.

Share this post


Link to post
Share on other sites

This was something I struggled with when I wrote a comprehensive bomb script. To detonate a bomb within a moving air target, I found this works:

_warhead = createVehicle [_explosive, _bombLoc, [], 0, "CAN_COLLIDE"];
_holder = createVehicle ["weaponHolder", _bombLoc, [], 0, "CAN_COLLIDE"];
_warhead setPosATL (getPosATL _holder);

Hopefully my var names are self explanatory. To get the bomb (and the holder) to occupy the same space as the aircraft model, you must use "CAN_COLLIDE". You can skip the weaponholder, but the bomb is far less effective. However, you may prefer it that way if you want it to look good, but not cause catastrophic damage.

Edited by AZCoder

Share this post


Link to post
Share on other sites

Not sure if I am doing this right. Tried via trigger and script, but didn't work properly and showed no script errors. Could you explain how to use this?

Share this post


Link to post
Share on other sites

Yeah. In the editor I placed a little bird and named it bomb just to be simple. Created a trigger which I grouped to the player (for ease of testing) and have it calling "bomb.sqf":

_bombLoc = getPosATL bomb;

_warhead = createVehicle ["Sh_125_HE", _bombLoc, [], 0, "CAN_COLLIDE"];
_holder = createVehicle ["weaponHolder", _bombLoc, [], 0, "CAN_COLLIDE"];
_warhead setPosATL (getPosATL _holder);

bomb setHit ["mala vrtule", 0.95];

When I walk into the trigger, the 125mm shell goes off which gives the nice poof effect. Then the setHit command does the real damage, and it spun around in circles for quite a while. One key thing I have noticed is to get vertical position correct, you need either getPosATL if over land, or getPosASL if over water. Otherwise the bomb may explode high or low, and look silly.

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  

×