After lots of searches in various archives, i found some other people that were basically facing the same problem.
The culprit apparently is the nature of the "killed" eventhandler.
In the case in which i wanted to use it (an eventhandler built-in vehicles classes in a config) the killed eventhandler i said to apply only on vehicles that are local to the player, that's why a player was not able to see the result of the killed eventhandler on vehicles that were on either server group or other players group.
Unfortunately, it seems the only workaround was to use the "init" eventhandler as this one is global.
As an init eventhandler means that i have to run a check to see if a vehicle is alive, to not destroy performance i must use a high enough delay, and in some conditions, the explosion/burn/smoke generated may be delayed and would look then mor elike a secondary explosion.
So as a solution , i have to release 2 versions of the main config.cpp of my mod, the one with the "killed" eventhandler that works flawlessly in SP (as it create the explosion/burn/smoke exactly when it should), and for MP a config using an init eventhandler that may have a delayed explosion that will look more like a secondary one.
This way it works nicely for both SP and MP
The MP version is launched by
class EventHandlers
{
init = "_this exec {\ww4_fx\MPburnn.sqs}";
};
and apparently from reports of Rellikki and his friends , do not need the locality check to work correctly and does not multiply the occurences of the script by the amount of player
The MPBurnn.sqs :
_tgt = _this select 0
#alivecheck
~10
?(isNull _tgt): exit
?(alive _tgt): goto "alivecheck"
_tgt setfuel 0;removeallweapons _tgt
[_tgt] exec {\ww4_fx\expsfx.sqs}
_BOOOM = "WW4_Shell73" camcreate [(getpos _tgt select 0), (getpos _tgt select 1), (getpos _tgt select 2)]; _Fuze = "FxExploGround1" camcreate getpos _BOOOM;
_burnlight = "WW4_LIGHTDES" camcreate getpos _tgt; _burnlight inflame true
_ii = 0
#lop
~0.5
_cent = getpos _tgt
_dst = 0.5 - random (1)
_burnlight setpos _cent
drop ["cl_fire","","Billboard",100,6,[(_cent select 0)+_dst,(_cent select 1)+_dst, (_cent select 2)-0.5],[0,0,2.1],0,13.6,10.8,0.9,[3,2.8,5.6,8.8],[[1,1,1,0],[1,1,1,0.9],[0.07,0,0,0.8],[0,0,0,0.6],[0,0,0,0]],[0,1,0,0.33,0.66],0.2,(0.28),"","",_cent]
drop ["cl_basic","","Billboard",100,25,[(_cent select 0)+_dst,(_cent select 1)+_dst, (_cent select 2)+1],[1,0,2.1],0,13.6,11.7,0.9,[5,15,30],[[0,0,0,0.2],[0,0,0,0.4],[0,0,0,0.6],[0,0,0,0.2],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[0,1,0,0.33,0.66],0.09,(0.09),"","",_cent]
_ii = _ii + 1
? _ii <= 600 : goto "lop"
#end
_burnlight inflame false
~1
deletevehicle _burnlight
exit
The SP version , launched by
class EventHandlers
{
killed="_this select 0 exec {\ww4_fx\burnn.sqs}";
};
the burnn.sqs :
_this setfuel 0;removeallweapons _this
[_this] exec {\ww4_fx\expsfx.sqs}
BOOOM = "WW4_Shell73" camcreate [(getpos _this select 0), (getpos _this select 1), (getpos _this select 2)]; Fuze = "FxExploGround1" camcreate getpos BOOOM;
_burnlight = "WW4_LIGHTDES" camcreate getpos _this; _burnlight inflame true
_ii = 0
#lop
~0.5
_cent = getpos _this
_dst = 0.5 - random (1)
_burnlight setpos _cent
drop ["cl_fire","","Billboard",100,6,[(_cent select 0)+_dst,(_cent select 1)+_dst, (_cent select 2)-0.5],[0,0,2.1],0,13.6,10.8,0.9,[3,2.8,5.6,8.8],[[1,1,1,0],[1,1,1,0.9],[0.07,0,0,0.8],[0,0,0,0.6],[0,0,0,0]],[0,1,0,0.33,0.66],0.2,(0.28),"","",_cent]
drop ["cl_basic","","Billboard",100,25,[(_cent select 0)+_dst,(_cent select 1)+_dst, (_cent select 2)+1],[1,0,2.1],0,13.6,11.7,0.9,[5,15,30],[[0,0,0,0.2],[0,0,0,0.4],[0,0,0,0.6],[0,0,0,0.2],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[0,1,0,0.33,0.66],0.09,(0.09),"","",_cent]
_ii = _ii + 1
? _ii <= 600 : goto "lop"
#end
_burnlight inflame false
~1
deletevehicle _burnlight
exit
(the expsfx.sqs is the smoke and flames that stay for some time after explosion)
_truck = _this select 0
_Gp = getpos _truck
_i = 0
_vel = 9
_vel2 = 5
_fir = [3,2]
_smk = [3,8]
#loop
drop ["cl_fire", "", "Billboard", 1, 1.5, [_Gp select 0, _Gp select 1, (_Gp select 2)+1], [random _vel2, random _vel2, random (_vel2*1.3)], 5, 50, 30, 1, _fir, [[1,1,0,1], [1,0.5,0,0.8], [1,1,0,0.7], [1,1,0,0.5], [1,1,0,0.1]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_fire", "", "Billboard", 1, 1.5, [_Gp select 0, _Gp select 1, (_Gp select 2)+1], [random (-_vel2), random _vel2, random (_vel2*1.3)], 5, 50, 30, 1, _fir, [[1,1,0,1], [1,0.5,0,0.8], [1,1,0,0.7], [1,1,0,0.5], [1,1,0,0.1]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_fire", "", "Billboard", 1, 1.5, [_Gp select 0, _Gp select 1, (_Gp select 2)+1], [random (-_vel2), random (-_vel2), random (_vel2*1.3)], 5, 50, 30, 1, _fir, [[1,1,0,1], [1,0.5,0,0.8], [1,1,0,0.7], [1,1,0,0.5], [1,1,0,0.1]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_fire", "", "Billboard", 1, 1.5, [_Gp select 0, _Gp select 1, (_Gp select 2)+1], [random (-_vel2), random (-_vel2), random (-_vel2)], 5, 50, 30, 1,_fir, [[1,1,0,1], [1,0.5,0,0.8], [1,1,0,0.7], [1,1,0,0.5], [1,1,0,0.1]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_fire", "", "Billboard", 1, 1.5, [_Gp select 0, _Gp select 1, (_Gp select 2)+1], [random _vel2, random (-_vel2), random (_vel2*1.3)], 5, 50, 30, 1, _fir, [[1,1,0,1], [1,0.5,0,0.8], [1,1,0,0.7], [1,1,0,0.5], [1,1,0,0.1]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_fire", "", "Billboard", 1, 1.5, [_Gp select 0, _Gp select 1, (_Gp select 2)+1], [random _vel2, random (-_vel2), random (-_vel2)], 5, 50, 30, 1, _fir, [[1,1,0,1], [1,0.5,0,0.8], [1,1,0,0.7], [1,1,0,0.5], [1,1,0,0.1]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_fire", "", "Billboard", 1, 1.5, [_Gp select 0, _Gp select 1, (_Gp select 2)+1], [random _vel2, random _vel2, random (-_vel2)], 5, 50, 30, 1, _fir, [[1,1,0,1], [1,0.5,0,0.8], [1,1,0,0.7], [1,1,0,0.5], [1,1,0,0.1]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_basic", "", "Billboard", 1, 3.5, [_Gp select 0, _Gp select 1, _Gp select 2], [random _vel/2, random _vel/2, random (_vel*1.3)], 0.5, 50, 30, 1, _smk, [[0,0,0,0.8], [0.1,0.1,0.1,0.6], [0.4,0.4,0.4,0.4], [0.7,0.7,0.7,0.1], [1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_basic", "", "Billboard", 1, 3.5, [_Gp select 0, _Gp select 1, _Gp select 2], [random (-_vel)/2, random _vel/2, random (_vel*1.3)/2], 0.5, 50, 30, 1, _smk, [[0,0,0,0.8], [0.1,0.1,0.1,0.6], [0.4,0.4,0.4,0.4], [0.7,0.7,0.7,0.1], [1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_basic", "", "Billboard", 1, 3.5, [_Gp select 0, _Gp select 1, _Gp select 2], [random (-_vel)/2, random (-_vel)/2, random (_vel*1.3)], 0.5, 50, 30, 1, _smk, [[0,0,0,0.8], [0.1,0.1,0.1,0.6], [0.4,0.4,0.4,0.4], [0.7,0.7,0.7,0.1], [1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_basic", "", "Billboard", 1, 3.5, [_Gp select 0, _Gp select 1, _Gp select 2], [random (-_vel)/2, random (-_vel)/2, random (-_vel)/2], 0.5, 50, 30, 1, _smk, [[0,0,0,0.8], [0.1,0.1,0.1,0.6], [0.4,0.4,0.4,0.4], [0.7,0.7,0.7,0.1], [1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_basic", "", "Billboard", 1, 3.5, [_Gp select 0, _Gp select 1, _Gp select 2], [random _vel/2, random (-_vel)/2, random (_vel*1.3)], 0.5, 50, 30, 1, _smk, [[0,0,0,0.8], [0.1,0.1,0.1,0.6], [0.4,0.4,0.4,0.4], [0.7,0.7,0.7,0.1], [1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_basic", "", "Billboard", 1, 3.5, [_Gp select 0, _Gp select 1, _Gp select 2], [random _vel/2, random (-_vel)/2, random (-_vel)/2], 0.5, 50, 30, 1, _smk, [[0,0,0,0.8], [0.1,0.1,0.1,0.6], [0.4,0.4,0.4,0.4], [0.7,0.7,0.7,0.1], [1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""]
drop ["cl_basic", "", "Billboard", 1, 3.5, [_Gp select 0, _Gp select 1, _Gp select 2], [random _vel/2, random _vel/2, random (-_vel)/2], 0.5, 50, 30, 1, _smk, [[0,0,0,0.8], [0.1,0.1,0.1,0.6], [0.4,0.4,0.4,0.4], [0.7,0.7,0.7,0.1], [1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""]
_i=_i+1
~0.1
?(_i < 5):goto "loop"
exit