Jump to content
Sign in to follow this  
Blace

Helicopter Part Damage not working?

Recommended Posts

Hello guys, let me start of about what a great game this is, i've been looking for a game with freedom like this for ages but i guess initially the hardcoreness of arma 2 stood me off a bit untill i've gotten used to it through DayZ. I have the utmost respect for the ArmA community and i'm real serious about achieving realism in games so i hope i don't attract a lot of DayZ haters because they're both great in their own right.

Now lets stop the smalltalk and continue with my question:

__________________________________________________________________________

I been working on a mission that involves a beefed up helicopter crash with some extra sounds and explosions. I've spent a day and a night without sleep trying to learn various aspects of the editor and the scripting, by now i've got a small grasp of what is possible and what not.

Currently my chopper first triggers a "HelicopterExploBig" but with allowDamage false, the real crashing part comes from setDamage 1 and then follow some extra explosions and smoke FX. What ive spent most of my previous night on was trying to get it to crash in stages with the individual parts malfunctioning.

chopper setHitPointDamage ["HitEngine,1"]; works but then the chopper will just stay spinning and frozen in the air, ofcourse i want it to spin so i went on looking to destroy the tail rotor so i tried "HitVRotor" in all sorts of ways, nothing seems to work. Ive also tried ["mala vrtule", 1]; and instead of setHitPointDamage i've tried setHit, getHit, getHitPointDamage and setDamage 0.1-0.9 based on my findings on the forums, mostly about Arma 2 stuff. Also, should it be so that setDamage 0.1 completely destroys the chopper the same as 0.9 or 1? it doesn't seem so for me.

Is this a bug currently? I swear i've searched but it came up with nothing on this subject and it's driving me nuts, hence the post, because usually i like to figure it out on my own so i learn better (maybe it's the sleep depravation). I've searched the functions list in the editor too and it came up with different damage types mentioning HRotor and VRotor aswell as the Engine so it should work as far as i'm concerned.

__________________________________________________________________________

If this does not work then i kinda have another idea and that is to spawn a small exlosion or ammo type on the position of the tailrotor relative to the chopper so that it will damage only that part. That gets me to the setPos stuff and opened up yet another secret room full of crazy scary stuff.

Searching the threads i've seen various methods.

Is it possible to set the position within the createVehicle command? Like: explo = "HelicopterExploSmall" createVehicle [0,0,0]; with the 0's being x,y,z? Also, is the Z bit relative to the chopper or relative to the ground?

Or should i create something and then use setPos and attachTo (note that i want to replace the explosion class because it's too much for what i want to do). I'm a bit in over my head for now because i do not yet understand the setPos stuff with the select 0, 1, 2 things that i've been reading about, sorry for being such a noob still :(

I've tried both but it just seems to spawn stuff from inside the helicopter, maybe you guys could provide me with the right method in my case or give me some pointers.

I hope this is enough info, feel free to ask anything.

Edit: Let me just post what i tried to do, note the sleep and damage false is because i want to test it and wait for me to finish loading:

//nul = [this] execVM "helo.sqf";

helo allowDamage false;
sleep 16;
grenade = "GrenadeHand_stone" createVehicle [0,0,0];
grenade setPos [(getPos helo select 0)-12,(getPos helo select1),(getPos helo select 2)];

This is probably all sorts of wrong but i'm trying to see actual results of something occur on a different spot.

Edited by Blace

Share this post


Link to post
Share on other sites

I played with this earlier today, had the setdamage to .9, fuel to zero, health and armor to zero and the guy still landed no problem. Right now the MH-9 and AH-9 are bugged and its already been reported. If your helicopter is just spinning try using setfuel command, at least he will spin to the ground and land.

Share this post


Link to post
Share on other sites

Hmm allright, thanks for that input, the problem though is that it does not spin at all, it's just a motionless hurling ball of fire that falls down defying gravity a bit because it seems too light :p

But please clarify, you used setDamage with 0.9, didn't it destroy everything completely? Or did yours go on a spin? I might have to check this out without all my other stuff and just let him trigger the setDamage, maybe something is affecting it.

---------- Post added at 10:02 ---------- Previous post was at 08:28 ----------

Oh jeez, you're right, setDamage 0.9 does the trick perfectly, i've just tested it with 3 triggers with a bit of distance between them, setDamage 0.9, then setFuel 0 and then a mid-air explosion, perfect for my needs.

In that case there must be something else affecting my script, do you think the allowDamage false; is automatically reset after you do setDamage 0.1-1? If so then it might be the explosion that is hurthing the chopper immediately after the setDamage, this is what i have, maybe i need to tweak the sleeps a bit:

//nul = [this] execVM "heliDamage.sqf";

chopper allowDamage false;
sleep 0.1;
explosion1 = "HelicopterExploBig" createVehicle getPos chopper; 
playSound3D ["a3\sounds_f\weapons\Rockets\explosion_missile_04.wav", chopper, false, getPos chopper, 1, 1, 0];
smokefx1 = "ArtilleryRocketCore" createVehicle getPos chopper; 
smokefx1 attachTo [chopper,[0,0,0]];
sleep 2; 
chopper setDamage 0,9;
sleep 0.1;
smokefx2 = "MissileCore" createVehicle getPos chopper;
smokefx2 attachTo [chopper,[0,0,0]]; 
explosion2 = "HelicopterExploBig" createVehicle getPos chopper; 
explosion2 attachTo [chopper,[0,0,0]]; 
sleep 1; 
smoke1 = "SmokeShellOrange" createVehicle getPos chopper; 
smoke1 attachTo [chopper,[0,0,0]]; 
sleep 1; 
smoke2 = "SmokeShellArty" createVehicle getPos chopper; 
smoke2 attachTo [chopper,[0,0,0]]; 
sleep 1; 
explosion3 = "HelicopterExploBig" createVehicle getPos chopper; 
explosion3 attachTo [chopper,[0,0,0]]; 
playSound3D ["a3\sounds_f\weapons\Rockets\explosion_missile_05.wav", chopper, false, getPos chopper, 1, 1, 0]; 
sleep 17.8; 
playSound3D ["a3\sounds_f\weapons\Explosion\expl_big_1.wav", chopper, false, getPos chopper, 1, 1, 0]; 

If the chopper's elevation is correct then this provides for an awesome crash :)

---------- Post added at 11:13 ---------- Previous post was at 10:02 ----------

Okay i tested it again and it works now, don't know what i did wrong previously. Now i'm just gonna have to play with the sleeps a bit for the right amount of spinning and crashing ^^ Thanks again. Although i tried it before the new thought process solved it anyway. Good point on the setFuel btw.

Edited by Blace

Share this post


Link to post
Share on other sites

Whats funny when I did setdamage to 0.9 the tail rotor and sometimes the main rotor would completely disappear and it would still land no problem. Its just bugged right now.

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  

×