in your main, you can do:
starter init_lens()
{
lens_view.visible = off;
lens_view.pos_x = 0; // set the same position for the second (lens) view
lens_view.pos_y = 0;
lens_view.size_x = screen_size.x; // and the sam size with camera's size
lens_view.size_y = screen_size.y;
lens_view.bmap = bmap_for_entity (lens_ent, 0); // render the view on the lens_ent's bitmap (sphere.mdl's skin)
while (1)
{
if(player)
{
if(key_m) { lens_view.visible = on; } else { lens_view.visible = off; }
lens_view.x = player.x; // keep the lens view in sync with the player
lens_view.y = player.y;
lens_view.z = player.z;
lens_view.pan = player.pan;
lens_view.tilt = player.tilt;
lens_view.roll = player.roll;
}
wait (1);
}
}
only thing you need to do now, is call the function on itself, not by a on_m call anymore.
then it will be visible while pressing m and invisible when not.
(I hope I got your question right).
regards,