Jump to content
Sign in to follow this  
Addetter

Increase health and AA12:

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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"

Edited by Celery

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

This is what I use

this addEventHandler ["HandleDamage",{if (_this select 1=="") then {damage (_this select 0)+((_this select 2)/[color="Red"]15[/color])}}];

The red digits seem to roughly mean the unit will have approx 15x health.

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by twirly

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  

×