Guest User

Untitled

a guest
Oct 17th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. ///Step Event
  2.  
  3.  
  4.  
  5. if (keyboard_check(ord("L")) && ComboCount && CanAttack < array_length_1d(combo)){
  6.  
  7. switch (ComboCount) {
  8.  
  9. case 0 :
  10.  
  11. if (image_angle = 1){
  12. sprite_index = combo[ComboCount];
  13. image_angle= 1;
  14. image_speed = 5;
  15. instance_create_depth(x+1,y,-10,obj_damage1);
  16.  
  17. } else {
  18. sprite_index = combo[ComboCount];
  19. image_angle = -1;
  20. image_speed = 5;
  21. instance_create_depth(x-1,y,-10,obj_damage1);
  22.  
  23. }
  24.  
  25. break;
  26.  
  27. case 1 :
  28.  
  29. if (image_angle = 1){
  30. sprite_index = combo[ComboCount];
  31. image_angle= 1;
  32. image_speed = 5;
  33. instance_create_depth(x+1,y,-10,obj_damage1);
  34.  
  35. } else {
  36. sprite_index = combo[ComboCount];
  37. image_angle = -1;
  38. image_speed = 5;
  39. instance_create_depth(x-1,y,-10,obj_damage1);
  40.  
  41. }
  42.  
  43. break;
  44.  
  45. }
  46.  
  47.  
  48. CanAttack = !CanAttack;
  49. ComboCount ++;
  50. image_index = 0;
  51.  
  52. }
  53.  
  54.  
  55.  
  56. /// Create
  57.  
  58. CanAttack = true;
  59.  
  60. combo[0] = spr_player_attack1;
  61. combo[1] = spr_player_attack2;
  62. combo[2] = spr_player_attack3;
  63.  
  64. ComboCount = 0;
  65.  
  66. IdleSprite = spr_player_stand;
  67.  
  68.  
  69. ///Animation End
  70.  
  71.  
  72.  
  73. if (CanAttack){
  74. sprite_index = spr_player_stand;
  75. CanAttack = !CanAttack;
  76. }
  77.  
  78. if (ComboCount >= array_length_1d(combo)) {
  79.  
  80. ComboCount = 0;
  81.  
  82. }
Add Comment
Please, Sign In to add comment