Jump to content
Tory Xiao

Fire support kill score problem

Recommended Posts

Im editing my own bulwark defending mission, but all fire support won't add score to the caller so these expensive supports became totally unaffordable. How do I add fire support kills to the caller? Thanks for answering!

Share this post


Link to post
Share on other sites

I guess you cant add kills to a player by script but you could add score:

 

https://community.bistudio.com/wiki/addRating

 

You would need to apply a killed EH on all units which could get killed by your fire supporters:

 

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Killed

 

If the supporters killed the specific unit then you could add points to the caller player.

Share this post


Link to post
Share on other sites

How are you calling the fire support? If it's totally by script I can vaguely think of ways of carrying the caller reference as arguments all the way to the projectile to attribute credit to him.

It would involve a "FiredMan" Event Handler on the fire support gunner, a temporary global variable and setShotParents. If it's a multiplayer mission it should execute server-side.

  • Like 1

Share this post


Link to post
Share on other sites
15 minutes ago, NunesSergio said:

How are you calling the fire support? If it's totally by script I can vaguely think of ways of carrying the caller reference as arguments all the way to the projectile to attribute credit to him.

It would involve a "FiredMan" Event Handler on the fire support gunner, a temporary global variable and setShotParents. If it's a multiplayer mission it should execute server-side.

fn_Cluster.sqf:


_player = _this select 0;
_targetPos = _this select 1;

if (count _targetPos == 0) then {
  [player, "Cluster"] call BIS_fnc_addCommMenuItem;
}else{
  _smoker = "SmokeShellGreen" createVehicle [_targetPos select 0, _targetPos select 1, 10];
  _smoker setVelocity [0,0,-100];
  _smoker setVectorDirandUp [[0,0,-1],[0.1,0.1,1]];
  sleep 4;
  _shell = "BombCluster_02_Ammo_F" createvehicle [_targetPos select 0, _targetPos select 1, 500];
  _shell setVelocity [0,0,-50];
  _shell setVectorDirandUp [[0,0,-1],[0.1,0.1,1]];
  [_shell, ["mortar2", 600, 1]] remoteExec ["say3D", 0];
};

It spawns a cluster bomb on top of the target, but the kills doesn't belong to the caller

Share this post


Link to post
Share on other sites
20 hours ago, sarogahtyp said:

As @NunesSergio stated try setShotParents on your _shell object right after creating it.

Thanks! Ill try that

Share this post


Link to post
Share on other sites
20 hours ago, sarogahtyp said:

As @NunesSergio stated try setShotParents on your _shell object right after creating it.

 

On 7/11/2021 at 7:06 PM, NunesSergio said:

How are you calling the fire support? If it's totally by script I can vaguely think of ways of carrying the caller reference as arguments all the way to the projectile to attribute credit to him.

It would involve a "FiredMan" Event Handler on the fire support gunner, a temporary global variable and setShotParents. If it's a multiplayer mission it should execute server-side.

 

It works, thanks alot guys

  • Like 1

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

×