start a test mission with one player unit and run this in debug console:
player addEventHandler ["HandleScore",
{
_unit = _this select 0;
_object = _this select 1;
_score = _this select 2;
_unit addScore 10;
false
}] {F24970}
start a test mission with one player unit and run this in debug console:
player addEventHandler ["HandleScore",
{
_unit = _this select 0;
_object = _this select 1;
_score = _this select 2;
_unit addScore 10;
false
}] {F24970}
The use case I am interested in for the HandleScore event handler is to be able to manipulate the MP scoretable. So it would be helpful to have an "addScore2" command that could also take as parameter the same object that is available inside HandleScore. I want to be able to give points not only the player who usually gets the score but also for the driver and gunner (usually tank commander gets the points and not the gunner or driver).
Example HandleScore code:
_unit = _this select 0;
_object = _this select 1;
_score = _this select 2;
if (vehicle _unit != _unit) then
{
[driver vehicle _unit, _object] addScore2 _score; [gunner vehicle _unit, _object] addScore2 _score; [commander vehicle _unit, _object] addScore2 _score;
}
Assuming the score table is empty before the code above is executed, the 3 players inside the tank now have 3 identical score lines on the table.
Since handlescore is now triggered for addscore, this is logical outcome - endless loop
Hello,
thank for the report. However, I cannot reproduce the crash even on a dedicated server. Could you please create a mission and upload it here? Thank you.
i added repro_mission.zip with the mission folder and the output I have in log file and the empty dump file that is generated when I shoot the OPFOR officer.
this issue is fixed (by the way I get an "Access Denied" page when I try to set the issue to "fixed" myself).