/*
Author: Phil aka Skullfox
Parameter(s):
0 Object used as relative dummy
1 User
2 unit affacted array
3 radius
Testing
[_object,player,[player]] execVM "xxx.sqf";
Addaction
this addaction["Use",{
params ["_target", "_caller", "_actionId", "_arguments"];
[_target,_caller,[player]] execVM "xxx.sqf";
}];
*/
_target = param[0,objNull];
_caller = param[1,objNull];
_affacted = param[2,[]];
_radius = param[3,7];
_array = nearestObjects [_target, ["Man"], _radius];
if(_array isEqualTo [])exitWith{};
_effect = {
_handle = ppEffectCreate ["radialBlur",100];
_handle ppEffectEnable true;
_handle ppEffectAdjust [0.04,0.05,0.35,0.2];
_handle ppEffectCommit 1;
waitUntil {ppEffectCommitted _handle};
uiSleep 1;
_handle ppEffectAdjust [0.0,0.0,0,0];
_handle ppEffectCommit 0.5;
waitUntil {ppEffectCommitted _handle};
_handle ppEffectEnable false;
ppEffectDestroy _handle;
};
{
if(_x in _affacted)then{
if(isPlayer _x)then{
[[],_effect]remoteExec["BIS_fnc_spawn",owner _x];
};
_x setVelocity [(sin (getDir _caller))*3, (cos (getDir _caller))*3, 3];
};
} forEach _array;
Comments