I got two questions:
1.Is there any way to set an unit to have more health than others (when the others have maxed out health), like a double health.
2.What is the class name of the AA12 and its ammo?
I got two questions:
1.Is there any way to set an unit to have more health than others (when the others have maxed out health), like a double health.
2.What is the class name of the AA12 and its ammo?
this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*0.5}}]
Bold is the multiplier of damage that gets through.
"AA12_PMC"
Last edited by Celery; Nov 5 2011 at 22:45.
Sorry about the old thread...but it's as good a place as any. I'm trying to understand "Handledamage" and the code above just does not seem to work.
I get a generic (so wonderfully descriptive!) error in expression if (_this select 3=="").
For the life of me I cannot understand how to limit a units damage to just barely alive!
This is what I use
The red digits seem to roughly mean the unit will have approx 15x health.Code:this addEventHandler ["HandleDamage",{if (_this select 1=="") then {damage (_this select 0)+((_this select 2)/15)}}];
It takes around 19 point blank rounds in a units back for them to die with this.
I don't really understand exactly what difference it is between what I use and what Celery posted.
I have searched the forums, Google, MSN, garage, shed, car, pockets, kitchen draws, pants, socks, down the sofa, under the bed, behind the Monitor, ashtray, belly button, cupboards, under cups, down the toilet, under the carpet, behind curtains, in Duvet cover, Wardrobe, inside the DVD player, searched the dog basket, "don't have a dog basket but I would have if I'd had one, and cannot find the answer to my question.
So here I am, on my hands and knees, begging for someone to have the answer to the question I may have posed above.
KonI™
It seems that I used select 3 when I meant to use select 1, funny that the OP didn't mention it. Fixed it and improved the damage handling.
My signature has a link to HandleDamage principles.
Thanks Koni.... that works.
I see Celery's code has actually been changed (in the last 5 minutes) to if (_this select 1!="")
That also works now!
Maybe I'll get somewhere now. Wow...what a blowmind difficult command!
@Celery... I didn't see your reply. Thanks also man.
Last edited by twirly; Nov 5 2011 at 22:54.