Have each action in a separate sqf file. Put these actions on an AI civilian with addAction.
// For Lead action
_hostage = _this select 0;
_activator = _this select 1;
_hostage setVariable ["activator", _activator, true];
_hostage setVariable ["following", 1, true];
_hostage enableAI "Move";
_hostage setUnitPos "UP";
(group _hostage) setBehaviour "CARELESS";
// We need to keep track of the last activator
// Also if the hostage should be following or holding
while {alive _hostage && ((_hostage getVariable "activator") == _activator) && ((_hostage getVariable "following") == 1)} do {
_hostage move getPos _activator;
sleep 1;
};
// For Stop action
_hostage = _this select 0;
_activator = _this select 1;
_hostage setVariable ["activator", _activator, true];
_hostage setVariable ["following", 0, true];
_hostage setUnitPos "Middle";
_hostage disableAI "Move";