2016-04-13 21:03:44 +00:00
|
|
|
// Get the variables from the event handler
|
|
|
|
_unit = _this select 0;
|
|
|
|
_aggressor = _this select 1;
|
|
|
|
_damage = _this select 2;
|
|
|
|
|
|
|
|
// remove the eventhandler to stop it triggering multiple times simultaneously
|
|
|
|
_unit removeAllMPEventHandlers "mphit";
|
|
|
|
|
|
|
|
if (side _aggressor == RESISTANCE) then
|
|
|
|
{
|
2016-04-15 00:49:24 +00:00
|
|
|
// Make victim and his group aggressive to players
|
|
|
|
_initialGroup = group _unit;
|
|
|
|
_group = createGroup WEST;
|
|
|
|
{
|
|
|
|
_unit = _x;
|
2016-05-04 08:57:54 +00:00
|
|
|
//[_unit] joinSilent grpNull;
|
2016-04-20 14:25:17 +00:00
|
|
|
[_unit] joinSilent _group;
|
|
|
|
_unit removeAllMPEventHandlers "mphit";
|
2016-04-15 00:49:24 +00:00
|
|
|
}foreach units _initialGroup;
|
|
|
|
|
2016-04-14 08:47:40 +00:00
|
|
|
_group reveal [_aggressor, 2.5];
|
|
|
|
_group move (position _aggressor);
|
2016-04-20 14:25:17 +00:00
|
|
|
};
|