put this in the initialization of the hostage. Also, name the hostage myhostage.
m = [myhostage] execVM "hostageStay.sqf"
hostageStay.sqf
_unit = _this select 0;
_oldPos = getPos _unit;
while {alive _unit} do
{
_newPos = getPos _unit;
if (_newPos distance _oldPos >= 3) then
{
_unit setPos [getPos _oldPos select 0, getPos _oldPos select 1, getPos _oldPos select 2];
};
Sleep 1;
};