Jump to content
Sign in to follow this  
atlantisthief

Handling Friendly Fire / Team Damage

Recommended Posts

Hey everyone,

I just need a small helper here:

I do some Zeus-Coop Missions with a bunch of people and sometimes accidents happen and friendly fire / team killing occurs. We are using AGM so everyone can be revived and so on, but there happens that player can't enter vehicle no more. I know this is related to friendly fire but how can I make my fellow players join vehicle although they did teamdamage accidently? This once killed a whole mission for me, as I couldn't get everyone transported. I tried to use "player addRating 10000" via the debug console to give every player a positive rating back, do I need to do this BEFORE the teamdamage happens?

Is there anyway to fix the situation AFTER it happened?

Share this post


Link to post
Share on other sites

I too am looking for a fix. However, its more of a problem than just friendly fire.

For instance if a pilot is injured and crashes the helicopter it will sometimes make the pilot out to be a team killer, with the friendly AI now shooting at that player.

Also if a vehicle is disabled and you decide to destroy the asset instead of recovering it the game will see you blowing the vehicle as a team kill. When you return to base the friendly AI shoot at you.

Share this post


Link to post
Share on other sites

_score = rating player;

if (_score < 0) exitwith {player addRating -(_score)+10; };

Share this post


Link to post
Share on other sites

You can run this loop on every player. Place the following code in your init.sqf.

if (hasInterface) then { // run on player only, excludes dedicated and HC
[] spawn {
while {true} do {
	if (rating player < 0) then {player addrating (-1*(rating player))};
    sleep 15;
};
};
};

Share this post


Link to post
Share on other sites

kju made a neat little addon for A2 - "DisabledFriendlyFire_Server_F_PvPscene" - which works in A3. Does exactly what the name says, & works perfectly in SP. I found it essential when I started playing A3 because the AI driving is so much worse than A2 & got sick of seeing an APC drop off a squad them mash half of it into the ground, also my 'allies' would quite often shoot the player - also seemed worse than in A2. I haven't checked with the more recent game updates but I expect it to work.

AFAICT it does the same thing for all AI of whatever side, friendly fire only - does not affect fire between sides.

Share this post


Link to post
Share on other sites
kju made a neat little addon for A2 - "DisabledFriendlyFire_Server_F_PvPscene" - which works in A3. Does exactly what the name says, & works perfectly in SP. I found it essential when I started playing A3 because the AI driving is so much worse than A2 & got sick of seeing an APC drop off a squad them mash half of it into the ground, also my 'allies' would quite often shoot the player - also seemed worse than in A2. I haven't checked with the more recent game updates but I expect it to work.

AFAICT it does the same thing for all AI of whatever side, friendly fire only - does not affect fire between sides.

Does this addon work for MP?

Looking for something that works on a Dedicated MP Server

Share this post


Link to post
Share on other sites

[{

player addEventHandler ["HandleDamage",

{

if (side (_this select 3) == side (_this select 0)) then {

.0;

player setDamage 0;

};

}];

},"BIS_fnc_spawn",true,true] call BIS_fnc_MP; //<-- PvP

* the script will be run for all players and JIP players. just add it to ur init of ur mission or in a true trigger.

** This is a better way of doing it because there is no infnite loop which reduces server load

Edited by iConic

Share this post


Link to post
Share on other sites
Does this addon work for MP?

Looking for something that works on a Dedicated MP Server

Sorry for the delay in replying, currently not very well.

kju made it for MP, so it should work just fine (haven't tested it with the latest A3 version yet, updating as I type).

The advantage of using this is that it works with existing missions, whether BIS or user-made. No need to unpack & modify.

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  

×