Jump to content
Sign in to follow this  
Doodle

Enemy only injured by specific weapon/faction

Recommended Posts

I am making a mission where 1 blufor guy has to kill 10 opfor guys.

In the mission I have various explosions set to go off as the player moves towards the enemy.

The problem I have is sometimes these explosions kill the opfor

What I need to be able to do is have some sort of code in the badguys init field such as:

badguy1 allowDamage false; (execpt if he is shot by the good guy)

And while I am at it. Can anyone help me with the following.

I need to set an area trigger that if a particular faction, in this case independent, enters the area they are killed. - Think instant death zone for independent

Trigger conditions

Activation: independent present

Condition: true

Act: what would I need to put in here?

Any help greatly appreciated

Share this post


Link to post
Share on other sites

Thanks for quick response

I will try it out and let you know

Share this post


Link to post
Share on other sites

Or with the killed eventhandler, something like :

this addeventhandler ["killed",{if (_this select 1 != player ) then {_this select 0 setdammage 0;}}];

Share this post


Link to post
Share on other sites

Hi,

You can try:

this addEventHandler ["HandleDamage", { if ((_this select 3) == UNITNAME) then { _this select 2 } }];

Where UNITNAME is the unit who can kill the one with this eventHandler.

_neo_

Share this post


Link to post
Share on other sites
Just tested, doesn't work with AI unit.

Ooops, was working in OFP, i didn't realize that it wasn't working anymore :rolleyes: Still playing both games a lot, mixing things together...

Share this post


Link to post
Share on other sites
HandleDamage EH is the only thing I can think of...

Act: {_x setDamage 1} forEach thislist (or something)

This seems to work - still need to test on dedi but looking good - Many thanks

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  

×