entity* mirrorsprite;
VIEW* mirror_view;
action mirror_sprite() // attach this action to a sprite / model that will be used for the mirror
{
mirrorsprite = my;
}
function mirror_startup()
{
while (!mirror_sprite)
{
wait (1);
}
mirror_view = view_create(10); // set the layer value for the new view to 10
wait (2);
mirror_view.size_x = 128;
mirror_view.size_y = 128; // the mirror sprite has 128x128 pixels
mirror_view.bmap = bmap_for_entity(mirrorsprite, 0);
mirror_view.visible = on;
vec_set(mirror_view.x, vector(1000, 500, 100)); // set the position of the mirror "eye"
vec_set(mirror_view.pan, vector(0, -10, 0)); // set the angles of the mirror "eye"
}