2 sprite_index = asset_get_index(string(_my_spr_shoot));
5 if(_range_atk and image_index < 1){
9 if(_up){_shoot_dir+=2;}
10 else if(_down){_shoot_dir-=2}
12 if(_shoot_dir > 0){_shoot_dir-=1;}
13 if(_shoot_dir < 0){_shoot_dir+=1;}
15 if(_shoot_dir > 90){_shoot_dir=90;}
16 if(_shoot_dir < -75){_shoot_dir=-75;}
26 if(image_index < 0.4){
27 if(_amount_of_bullets > 0 ){
28 if(_my_bullet_type == "obj_bullet"){
29 audio_play_sound(snd_glock_shoot,10,false);
30 }else if(_my_bullet_type == "obj_kunai"){
31 audio_play_sound(snd_throw,10,false);
34 //audio_play_sound_ext(global._pistol_snd);
37 var _blt_x = 12*image_xscale;
40 if _right _blt_dir = 45;
41 else if _left _blt_dir = 135;
42 else _blt_dir = 90; _blt_x = 0; _blt_y = 14;
44 if _right _blt_dir = 315;
45 else if _left _blt_dir = 225;
46 else _blt_dir = 270; _blt_x = 0; _blt_y = -14;
48 if image_xscale = 1 _blt_dir = 0
49 if image_xscale = -1 _blt_dir = 180;
52 var _my_bullet = instance_create_layer(x + _blt_x, y - _blt_y, "Instances", asset_get_index(string(_my_bullet_type)), {direction : _blt_dir});
57 var _blt_x = 12*image_xscale;
59 if(image_xscale == -1){_shoot_dir = 180 - _shoot_dir}
60 var _my_bullet = instance_create_layer(x + _blt_x, y - _blt_y, "Instances", asset_get_index(string(_my_bullet_type)), {direction : _shoot_dir});
64 //audio_play_sound(snd_empty_gun,10,false);
71 if(!_grounded){_state = HERO.JUMP;image_index = 1;_shoot_dir = 0;}