leafbarrett

dspecial

Feb 13th, 2020
830
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ===ATTACK_UPDATE===
  2. if (attack == AT_DSPECIAL){
  3.     can_jump = true;
  4.     if (window < 4) {
  5.         can_fast_fall = false;
  6.     }
  7.     if (window == 1){
  8.         if (window_timer == 1){
  9.             times_through = 0;
  10.         }
  11.         else if (window_timer == get_window_value(attack, 1, AG_WINDOW_LENGTH)
  12.         {
  13.             if (free) {window = 3;}
  14.             else {window = 2;}
  15.         }
  16.     }
  17.     else if (window == 2 || window == 3){
  18.         if (window == 2 && free) {window = 3;}
  19.         else if (window == 3 && !free) {window = 2;}
  20.         if (times_through < 4){
  21.             if (window_timer == get_window_value(attack, 2, AG_WINDOW_LENGTH)){
  22.                 if (times_through < 4){
  23.                     times_through++;
  24.                     window_timer = 0;
  25.                 }
  26.                 else
  27.                 {
  28.                     window = 4;
  29.                     window_timer = 0;
  30.                 }
  31.             }
  32.         }
  33.     }
  34. }
  35.  
  36. ===DSPECIAL===
  37. set_attack_value(AT_DSPECIAL, AG_CATEGORY, 2);
  38. set_attack_value(AT_DSPECIAL, AG_SPRITE, sprite_get("dspecial"));
  39. set_attack_value(AT_DSPECIAL, AG_AIR_SPRITE, sprite_get("dspecial"));
  40. set_attack_value(AT_DSPECIAL, AG_NUM_WINDOWS, 1); //1 causes a fidget, other values loop forever
  41. set_attack_value(AT_DSPECIAL, AG_HAS_LANDING_LAG, 0);
  42. set_attack_value(AT_DSPECIAL, AG_OFF_LEDGE, 1);
  43. set_attack_value(AT_DSPECIAL, AG_HURTBOX_SPRITE, sprite_get("dspecial_hurt"));
  44. set_attack_value(AT_DSPECIAL, AG_HURTBOX_AIR_SPRITE, sprite_get("dspecial_hurt"));
  45.  
  46. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_TYPE, 1);
  47. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_LENGTH, 4);
  48. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_ANIM_FRAMES, 2);
  49. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_HAS_SFX, 1);
  50. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_SFX, sound_get("snd_specd"));
  51. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_HSPEED, 0);
  52. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_VSPEED, 0);
  53. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_HSPEED_TYPE, 1);
  54. set_window_value(AT_DSPECIAL, 1, AG_WINDOW_VSPEED_TYPE, 1);
  55.  
  56. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_TYPE, 9);
  57. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_LENGTH, 2);
  58. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_ANIM_FRAMES, 2);
  59. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_ANIM_FRAME_START, 2);
  60. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_HSPEED, 12);
  61. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_VSPEED, 0);
  62. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_HSPEED_TYPE, 1);
  63. set_window_value(AT_DSPECIAL, 2, AG_WINDOW_VSPEED_TYPE, 1);
  64.  
  65. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_TYPE, 9);
  66. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_LENGTH, 2);
  67. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_ANIM_FRAMES, 2);
  68. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_ANIM_FRAME_START, 2);
  69. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_HSPEED, 8);
  70. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_VSPEED, 8);
  71. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_HSPEED_TYPE, 1);
  72. set_window_value(AT_DSPECIAL, 3, AG_WINDOW_VSPEED_TYPE, 1);
  73.  
  74. set_window_value(AT_DSPECIAL, 4, AG_WINDOW_TYPE, 1);
  75. set_window_value(AT_DSPECIAL, 4, AG_WINDOW_LENGTH, 4);
  76. set_window_value(AT_DSPECIAL, 4, AG_WINDOW_ANIM_FRAMES, 2);
  77. set_window_value(AT_DSPECIAL, 4, AG_WINDOW_ANIM_FRAME_START, 4);
  78. set_window_value(AT_DSPECIAL, 4, AG_WINDOW_HSPEED, 4);
  79. set_window_value(AT_DSPECIAL, 4, AG_WINDOW_HSPEED_TYPE, 1);
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×