In the following video you see a little white cube that's a func_rotating on the x axis, randomishly triggered by a trigger_timer to invert rotation. Bound to that is the red square plane, that's also a func_rotating, but on the z axis. Bound to that is the little blue cube, that's a sliding door (auto open auto close) named Target.
Bat Mechanics
The Bat itself is green in the video and is made up of two wing shaped atdm:mover_door's (auto open auto close) bound to a func_mover named Bat (the body of the bat). With 2 little scripts, activated once by atdm:target_callscriptfunction's, the Bat is following and turnig towards the Target:
void MoveToTarget()
{
float min = 10;
float max = 20;
float rand = min + sys.random(max - min);
$Bat.time (rand/30);
$Bat.accelTime (0);
$Bat.decelTime (0);
$Bat.moveTo( $Target );
sys.wait (0.1);
sys.trigger($ScriptMove);
}
void LookAtTarget()
{
vector direction=$Bat.getOrigin()-$Target.getWorldOrigin();
$Bat.setAngles(sys.VecToAngles(-direction)+'0 0 0');
sys.wait (0.1);
sys.trigger($ScriptLook);
}
If anyone wants a bat flying around in their mission, just pm me for the model and stuff : )