Page MenuHomeFeedback Tracker

[Solved] addOwnedMine does not properly credit player for kills
New, NormalPublic

Description

When a player places a satchel and detonates it when enemies are near, normally param 3 of HandleDamage will return the player object as the source of the damage, allowing the player to be credited for the kills.

However, if a scripted satchel that was assigned to a player via addOwnedMine is detonated, the source is <NULL-object>, thus preventing him from being credited.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
player addEventHandler ["HandleDamage", {diag_log str _this; _this select 2}];
_mine = createMine ["SatchelCharge_F", getPos player, [], 0];
player addOwnedMine _mine;
_mine setDamage 1;

Event Timeline

AgentRev created this task.Jun 17 2016, 9:44 PM
AgentRev updated the task description. (Show Details)Jun 17 2016, 9:51 PM
AgentRev edited Steps To Reproduce. (Show Details)
AgentRev edited Steps To Reproduce. (Show Details)

Nevermind, I found the problem, you need to use TouchOff instead of setDamage 1. This is for a suicide bomb script:

_oldMines = getAllOwnedMines player;
removeAllOwnedMines player;

_bomb = createMine ["SatchelCharge_F", ASLtoAGL getPosASL player, [], 0];
player addOwnedMine _bomb;
player action ["TouchOff", player];

{ player addOwnedMine _x } forEach _oldMines;
AgentRev renamed this task from addOwnedMine does not properly credit player for kills to [Solved] addOwnedMine does not properly credit player for kills.Jun 17 2016, 10:32 PM