Page MenuHomeFeedback Tracker

addRating or setFriendly prevents players from using vehicles and parachutes
Need More Info, WishlistPublic

Description

Deathmatch mode has Friendly Fire.

To fix that i try to make Renegades ("ENEMY" side unit) with addRating or WEST setFriend [WEST, 0] and it works, but then i can't use BLUFOR vehicles like parachutes or UAVs.

Details

Legacy ID
4021626433
Severity
None
Resolution
Open
Reproducibility
Always
Category
Multiplayer
Steps To Reproduce

make a DM Game with respawn:

class Header
{

gameType = DM;
minPlayers = 2;
maxPlayers = 12;

};

respawn = 3;
respawndelay = 15;
respawnOnStart = 1;
respawnTemplates[] = {"Counter","Tickets","Spectator"};

on editor make 12 BLUFOR Units and "respawn_west" marker

make Renegades with this on init.sqf:

if (isServer) then {WEST setFriend [WEST, 0];};

or this:

While {True} Do
{

_i = 0;
While {_i < Count AllUnits} Do
{
    If (Rating (AllUnits Select _i) > -6000) Then
    {
        (AllUnits Select _i) Addrating ((- Rating (AllUnits Select _i)) - 3000); 
    };
    _i = _i + 1;
    Sleep 0.1;
 };

};

make units on a parachute at OnPlayerRespawn.sqf:

private["_newunit","_oldunit","_respawn","_respawndelay"];
_newunit = _this select 0;
_oldunit = _this select 1;
_respawn = _this select 2;
_respawndelay = _this select 3;
_newunit addbackpack "B_Parachute";
_newunit setPosATL [getPosATL _newunit select 0, getPosATL _newunit select 1, 1000];

and.. crash unit with the ground because you don't have "Open Parachute" Action :)

Event Timeline

A3D edited Steps To Reproduce. (Show Details)Mar 31 2014, 2:11 AM
A3D edited Additional Information. (Show Details)
A3D set Category to Multiplayer.
A3D set Reproducibility to Always.
A3D set Severity to None.
A3D set Resolution to Open.
A3D set Legacy ID to 4021626433.May 7 2016, 6:18 PM

Did I understand right, the problem arises when you both use addRating OR setFriend? It seems extremely odd to me, that both commands independently cause you to be unable to use vehicles or parachutes (I could not try a repro myself, it would help if you attached a mini-mission).

Can you verify that there is not another issue to the mission?

A3D added a comment.Apr 1 2014, 5:07 AM

Hi fireball, I know that these commands do not allow you to use vehicles. So how I can prevent friendly fire on deathmatch mode?

On deathmatch mode, fire-friendly should not be enabled.

I will attach one minimision later so you can try it.

Your ticket has the wrong title. You're looking for a solution to your scripting problem. Please use the BI forums for that (http://forums.bistudio.com). I'm sure there is a solution for that already (e.g. EH handleDamage).

I suggest we correct the description and then analyze your issue.

Fixed title for you.

My question is if you're not simply doing it wrong and if the issue you observed is by design.

A3D added a comment.Apr 1 2014, 7:36 AM

yes, thanks for your time fireball, my question is why Friendly fire is enabled on DM. Deathmatch is all vs all no? so when you make a DM mission and put some same-sided units to play with them; when you kill a unit, shows a friendly-fire message and your score adds -xxx. I think this is wrong. Or not?