Jump to content
Sign in to follow this  
Enigma

Self-Damage when shooting Civilian...

Recommended Posts

I am making a mission where RACS forces go into a village that has half armed civilians and unarmed civilians. I want to deter the RACS from shooting all civilians and making it easy on them, so I would like to put an ingame punishment; If they shoot and kill a friendly civilian then they will do damage to themselves and if they do it enoujgh they will die.

Does anyone know how to do this? I have looked around but found nothing.

Share this post


Link to post
Share on other sites

I would suggest

In the onActivation-Line of a trigger, which is activated by Civilians only and covers the certain area:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{ _nilPoint = _x addEventHandler[ "killed",{ _this exec "checkForHarm.sqf" ]; }forEach thislist;

checkForharm.sqf

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if( ( count weapons _this select 0 )> 0 )then

{

_this select 1 setDammage =( getDammage _this select 1 )+ 0.1;

};

(Didn't try)

Share this post


Link to post
Share on other sites
I would suggest

In the onActivation-Line of a trigger, which is activated by Civilians only and covers the certain area:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{ _nilPoint = _x addEventHandler[ "killed",{ _this exec "checkForHarm.sqf" ]; }forEach thislist;

checkForharm.sqf

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if( ( count weapons _this select 0 )> 0 )then

{

_this select 1 setDammage =( getDammage _this select 1 )+ 0.1;

};

(Didn't try)

Thanks

Share this post


Link to post
Share on other sites

As per my SOP, I have a half-assed solution to this problem (though it seems to be taken care of already).

The way I did it was to monitor each player's rating. Once it dropped too low (say, -3000) a trigger would kick in and setpos the offending player to a remote island off the coast of Sahrani.

I thought about removing all their weapons as well and adding a single weapon crate with a single grenade, just to get the point across. icon_rolleyes.gif

But truth be told the above seems much more pro. I just can't script so I use trigger solutions for everything. The wonders of Biki, eh?

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  

×