Not sure that will work because "this" in activation will return false, not a unit as you want.
Here's an example I whipped up for velocity sensitve IEDs:

Originally Posted by
Trigger
Activated by: Blufor, Present, Repeated
Size: Rectangular, 5, 1
Timer: 0, 0, 0, countdown
On activation: if (isServer) then { {nul = [thisTrigger, _x,"B_30mm_HE",0.2,2] execVM "scripts\speedtrap.sqf";} forEach thisList; };
Which says that for each blufor present in the trigger area, run the script passing the name of the trigger, the name of the unit and the values "B_30mm_HE", 0.2 and 2 to the script. (Explosive device, chance of being set off, radius of placement)
The script then looks like this (I doubled up on isServer, but it pays to be careful with locality):
Code:
private ["_unit","_speed","_allowedSpeed","_trigger","_ammotype","_chance","_variance","_variancey","_rand"];
if (isServer) then {
_trigger = _this select 0;
_unit = _this select 1;
if (!rps_param_ieds) exitWith {_trigger setpos [-200,-200];}; //disable IEDs by param, ignore the rest of this isServer loop!
_speed = sqrt ( (velocity _unit select 0)^2 + (velocity _unit select 1)^2 + (velocity _unit select 2)^2 ); // getspeed is in different units
_allowedSpeed = 3.9; //(_unit getSpeed "Normal")-0.1;
// For an infantry unit, slow/norm/fast are 2.7/4/6.666 or thereabouts
// Check speed
if (_speed > _allowedSpeed) then {
_ammotype = _this select 2;
_chance = _this select 3;
_variance = _this select 4;
if (isNil "_ammotype") then {_ammotype="B_30mm_HE";};
if (isNil "_chance") then {_chance=0.20;};
if (isNil "_variance") then {_variance=1;};
_chance = (_chance * 100);
_variancey = random _variance - (_variance/2);
_variance = random _variance - (_variance/2);
_rand = random 100;
if (_rand < _chance) then {
_ammotype createVehicle [(getPos _unit select 0) + _variance,(getPos _unit select 1) + _variancey]; // place bomb within radius
_trigger setpos [-200,-200]; // exploded, so no longer need trigger
} else {
if ( _rand > (98 min (100-(_chance/10))) ) then { // each time it is run over but not exploded, there is a chance of accidentally defusing the bomb, min 2% but relative to the chance of the bomb actually going off
_trigger setpos [-200,-200]; //complete dud; with _chance of 0.15 there is a 15% chance of detonation and a 2% (minimum) chance of defusal. 0.25 = 25%, 2.5%
};
};
};
};