Jigsor 176 Posted June 12, 2014 Csat ammo boxes or all ammo boxes from my understanding belong to civilian. So I'm blufor and my objective is to destroy enemy ammo cache "Box_East_Ammo_F". If I destroy ammo cache I get -1 point on heavy vehicle and -3 total. Fine, I have and eventhandler "killed" on ammo box that adds score to the guy who destroyed it. If want to award 15 point to the player, I actually have to award 18 points to compensate negative score. OK, got that sorted ,but scoreboard still shows a -1 for the heavy armor as record. Is there away to turn that negative to positive or hide/get rid of it? Related negative score bug:http://feedback.arma3.com/view.php?id=11505 Share this post Link to post Share on other sites
Tajin 349 Posted June 12, 2014 The only way I know off is by using a "handleDamage" event. You basically block the regular incoming damage and then apply the same via setDamage. That way the game can't tell who caused the damage and therefor won't alter your score. It's an old and kinda annoying bug that can happen when destroying all sorts of objects. Share this post Link to post Share on other sites
KC Grimes 79 Posted June 12, 2014 I don't think that there is a way to cleanly manipulate the actual "visible" score, other than the overall/personal one. Meaning, you can't addVehicleScore or addAircraftScore, unfortunately. Share this post Link to post Share on other sites
zooloo75 834 Posted June 12, 2014 (edited) BIS should just remove the scoreboard completely, it serves no purpose in this game. Edited June 12, 2014 by zooloo75 Share this post Link to post Share on other sites
genesis92x 810 Posted June 12, 2014 I would have to agree with zooloo. I turned off the scoreboard for my server - no one has complained... Anyway, I think Grimes has the right idea. You can change a players personal rating and score so he/she isn't considered ENEMY, but you would have to add a handledamage event handler to the box and add damage that way. Share this post Link to post Share on other sites
Jigsor 176 Posted June 12, 2014 (edited) Thanks for the suggestions guys. SetDamage sounds like it will work, but testing this function gives me the same results. I'd like to keep scoreboard if I can make it work. I already had handledamage eventhandler limiting what munitions could destroy cache. Killed eventhandler is now removed and scoring is in handledamage eventhandler. _ammocache = createVehicle [_objtype , position cur_cache_pos, [], 0, "None"]; sleep 0.1; //_ammocache addEventHandler ["killed", {handle = [(_this select 0),(_this select 1)] execVM "scripts\AmmoCache_Score.sqf"}]; _ammocache addeventhandler ["handledamage",{_this call ammmoCache_handleDamage}]; I still get a negative 3 score with both of these edits. Removing refference of source does not have effect handledamage Passed array: [unit, selectionName, damage, source, projectile] JIG_ammmoCache_damage = { _cache = _this select 0; _damage = _this select 2; _source = _this select 3; _ammo = _this select 4; if ((_ammo == "satchelCharge_remote_ammo") || (_ammo == "demoCharge_remote_ammo")) then { //--- Increase damage, add score, remove eventhandler, delete cache box //_damage = _damage * 3; _cache setDamage 1; _cache removeAllEventHandlers "handledamage"; _pScore = 18; _source addScore _pScore; paddscore = [_source, _pscore]; publicVariable "paddscore"; deleteVehicle _cache; } else { _damage = 0; }; _damage }; JIG_ammmoCache_damage = { _cache = _this select 0; _damage = _this select 2; //_source = _this select 3; _ammo = _this select 4; if ((_ammo == "satchelCharge_remote_ammo") || (_ammo == "demoCharge_remote_ammo")) then { //--- Increase damage, add score, remove eventhandler, delete cache box //_damage = _damage * 3; _cache setDamage 1; _cache removeAllEventHandlers "handledamage"; //_pScore = 18; //_source addScore _pScore; //paddscore = [_source, _pscore]; publicVariable "paddscore"; deleteVehicle _cache; } else { _damage = 0; }; _damage }; Is it not possible to handle scoring and limit damage on objects that do not belong to opposing side through bis eventhandler? Edited June 12, 2014 by Jigsor Share this post Link to post Share on other sites
Tajin 349 Posted June 13, 2014 That is probably because your handleDamage function still passed the original damage value to ArmA. Try this instead: JIG_ammmoCache_damage = { _cache = _this select 0; _damage = _this select 2; _source = _this select 3; _ammo = _this select 4; if ((_ammo == "satchelCharge_remote_ammo") || (_ammo == "demoCharge_remote_ammo")) then { if (_damage > 0.9) then { _damage = 0.9 }; _cache setDamage 1; _pScore = 18; _source addScore _pScore; paddscore = [_source, _pscore]; publicVariable "paddscore"; _cache removeAllEventHandlers "handledamage"; deleteVehicle _cache; } else { _damage = 0; }; _damage }; Share this post Link to post Share on other sites
Jigsor 176 Posted June 13, 2014 (edited) No luck Tajin. The results are the same. Still negative score. If no return of damage at end of function by commenting //_damage the result is also the same. Edited June 13, 2014 by Jigsor Share this post Link to post Share on other sites
Tajin 349 Posted June 13, 2014 Oh, interesting. It should help to add a delay to the destruction of the box and don't do it directly inside the eventHandler. Like this: JIG_ammmoCache_damage = { _cache = _this select 0; _damage = _this select 2; _source = _this select 3; _ammo = _this select 4; _out = 0; if ((_ammo == "satchelCharge_remote_ammo") || (_ammo == "demoCharge_remote_ammo")) then { _cache spawn { sleep 1; _this setDamage 1; sleep 3; deleteVehicle _this; }; _pScore = 18; _source addScore _pScore; paddscore = [_source, _pscore]; publicVariable "paddscore"; }; _out }; Share this post Link to post Share on other sites
Jigsor 176 Posted June 13, 2014 _cache spawn { sleep 1; _this setDamage 1; sleep 3; Did the trick. It works perfectly! Thank you Tajin. Share this post Link to post Share on other sites