function shoot_maingun(){
me.scale_x= 0.7;
me.scale_y= 0.7;
me.scale_z= 0.7;
my.ambient = 50; // medium bright
my.lightrange = 300; // activate dynamic light
vec_set( my.blue,vector(255,50,50)); // bluish light color
//set(me,BRIGHT); // additive blending
vec_scale(my.scale_x,0.3); // small size
c_setminmax(my); // set my bounding box to my real size
// positioning the grenade ( in this case a scaled house, grenade model on todo list )
// get tank vector in vec_for_bone
// set the tank vector as the starting point when shooting the gun with vec_set
vec_for_bone(temp2, you ,"end_barrel_bone");
vec_set(my.x,temp2);
//me.STATE = 1;
ang_for_bone(temp1, you ,"end_barrel_bone");
debugValueEndBarrelBoneAngle = temp1;
me.pan = temp1 - 90;
while(1){
//set(my,FLAG2);
//if ( me.STATE == 1 )
my.roll += 40*time_step;
//c_move( my,vector( 70*time_step,0,0),NULL,IGNORE_YOU );
c_move( my,vector( 5*time_step,0,0),NULL,IGNORE_YOU );
//if ( me.STATE == 2 )
wait(1);
}
}