Some of the object commands act strangely when applied to the ego. My solution would be to:
if (said("draw","gun")) {
animate.obj(o1);
load.view(drawing_gun);
set.view(o1, drawing_gun);
position.v(o1, new_ego_x, new_ego_y);
erase(ego);
draw(o1);
program.control();
end.of.loop(o1, done_flag);
}
if (done_flag) {
reset(done_flag);
load.view(ego_drawn_gun);
set.view(ego, ego_drawn_gun);
erase(o1);
draw(ego);
player.control();
}
That's a bit of a kludge, because it doesn't deal with putting away the gun or memory problems associated with repeatedly drawing and holstering your gun. So, load all views and animate the drawing/holstering object in the if (new_room) {} block of your code

.
But, it should give you a starting point.