Advertisement
PXshadow

Test Character Attack Code

Jun 5th, 2016
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.     //light attack
  4.          //aa = last attack asf = last attack / therefore if you have 5 attack(hiboxInt) then asf = asf5 , aa = aa5 ( note every new hitbox is always + 1 startup frame to what ever the vaule is)
  5.            
  6.            
  7.            
  8.                
  9.                 //jab/ nlight
  10.             if (Input.pressed("light") && Input.check("up") != true && Input.check("down") != true && Input.check("left") != true && Input.check("right") != true && inAir == false ){
  11.                
  12.            
  13. aa['x1'] = 30 * player.scaleX;
  14. aa['y1'] = -5;
  15. aa['w1'] = 30;
  16. aa['h1'] = 15;
  17. aa['a1']  = 12;
  18. aa['sf1'] = 3;
  19. aa['fy1'] =  -0.2;
  20. aa['fx1'] =  0.2 * player.scaleX;
  21. aa['d1'] = 9;
  22. aa['s1'] = 25;
  23. aa['m1'] = 0.005;
  24.  
  25.  
  26.  
  27. acceleration = 0;
  28.  
  29.  
  30.  
  31. i = 20;
  32. hi = 1;
  33. player.play("nl");
  34. ifAttack = true;
  35.                
  36.             }
  37.            
  38.  
  39.            
  40.            
  41.             //dlight/downtilt
  42.            
  43.                 if (Input.pressed("light") && Input.check("up") != true && Input.check("down") == true  && inAir == false ){
  44.  
  45. aa['x1'] = 30 * player.scaleX;
  46. aa['y1'] = 30;
  47. aa['w1'] = 40;
  48. aa['h1'] = 18;
  49. aa['a1']  = 16;
  50. aa['sf1'] = 1;
  51. aa['fy1'] = -1.8 ;
  52. aa['fx1'] =  0.07 * player.scaleX;
  53. aa['d1'] = 4;
  54. aa['s1'] = 20;
  55. aa['m1'] = 0;
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. //slide = true
  63. //acceleration = 0;
  64.  
  65.  
  66. i = 23;
  67. hi = 1;
  68. player.play("dl");
  69. ifAttack = true;
  70.                
  71.                    
  72.                
  73.             }
  74.            
  75.                 //uplight / uptilt
  76.                 if (Input.pressed("light") && Input.check("up") == true && Input.check("down") != true && Input.check("left") != true && Input.check("right") != true && inAir == false ){
  77.            
  78.  
  79.                    
  80.                    
  81.                                
  82. aa['x1'] = 20 * player.scaleX + velocity + acceleration;
  83. aa['y1'] = -20 + velocityY;
  84. aa['w1'] = 15;
  85. aa['h1'] = 15;
  86. aa['a1']  = 23;
  87. aa['sf1'] = 13;
  88. aa['fy1'] = -.5 ;
  89. aa['fx1'] =  0 * player.scaleX;
  90. aa['d1'] = 7;
  91. aa['s1'] = 10;
  92.  
  93. aa['m1'] = 0.05;
  94.  
  95. aa['x2'] = 30 * player.scaleX + velocity + acceleration;
  96. aa['y2'] = -30 + velocityY;
  97. aa['w2'] = 15;
  98. aa['h2'] = 15;
  99. aa['a2']  = 23;
  100. aa['sf2'] = 10;
  101. aa['fy2'] = -.5 ;
  102. aa['fx2'] =  0 * player.scaleX;
  103. aa['d2'] = 7;
  104. aa['s2'] = 10;
  105.  
  106. aa['m2'] = 0.05;
  107.  
  108. aa['x3'] = 30 * player.scaleX + velocity + acceleration;
  109. aa['y3'] = -50 + velocityY;
  110. aa['w3'] = 15;
  111. aa['h3'] = 15;
  112. aa['a3']  = 23;
  113. aa['sf3'] = 10;
  114. aa['fy3'] = -.5 ;
  115. aa['fx3'] =  0 * player.scaleX;
  116. aa['d3'] = 7;
  117. aa['s3'] = 10;
  118.  
  119. aa['m3'] = 0.05;
  120.  
  121. //slide true
  122. //acceleration = 0;
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. i = 50;
  132. hi = 3;
  133. player.play("ul");
  134.  
  135. ifAttack = true;
  136.  
  137.                
  138.                
  139.             }
  140.            
  141.  
  142.             //slight / foward tilt
  143.             if (Input.pressed("light") && Input.check("up") != true && Input.check("down") != true && inAir == false ){
  144.            
  145.                 if(Input.check("left") || Input.check("right")){
  146.  
  147.                
  148.                    
  149.                                
  150. aa['x1'] = 30 * player.scaleX + velocity + acceleration;
  151. aa['y1'] = 3;
  152. aa['w1'] = 30;
  153. aa['h1'] = 10;
  154. aa['a1']  = 10;
  155. aa['sf1'] = 10;
  156. aa['fy1'] = 0 ;
  157. aa['fx1'] =  0.25 * player.scaleX;
  158. aa['d1'] = 6;
  159. aa['s1'] = 20;
  160. aa['dir1'] = 4;
  161. aa['m1'] = .025;
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168. i = 20;
  169. hi = 1;
  170. player.play("sl");
  171. ifAttack = true;
  172.  
  173.  
  174.                
  175.                 }
  176.             }
  177.            
  178.            
  179.             //air attacks
  180.            
  181.             //nair
  182.             if (Input.pressed("light") && Input.check("up") != true && Input.check("down") != true && Input.check("left") != true && Input.check("right") != true && inAir == true ){
  183.  
  184.  
  185.  
  186. aa['x1'] = 0 * player.scaleX + velocity;
  187. aa['y1'] = -5 + -velocityY;
  188. aa['w1'] = 55;
  189. aa['h1'] = 20;
  190. aa['a1']  = 10;
  191. aa['sf1'] = 0;
  192. aa['fy1'] =  0;
  193. aa['fx1'] =  .05 * player.scaleX;
  194. aa['d1'] = 10;
  195. aa['s1'] = 10;
  196. aa['m1'] = 0.05;
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. i = 20;
  205. hi = 1;
  206. player.play("nair");
  207. ifAttack = true;
  208.                
  209.  
  210.             }
  211.            
  212.             //side air
  213.            
  214.             if (Input.pressed("light") && Input.check("up") != true && Input.check("down") != true && inAir == true ){
  215.            
  216.                 if(Input.check("left") || Input.check("right")){
  217.  
  218.                    
  219. aa['x1'] = 20 * player.scaleX + velocity;
  220. aa['y1'] = -15 + -velocityY;
  221. aa['w1'] = 55;
  222. aa['h1'] = 20;
  223. aa['a1']  = 10;
  224. aa['sf1'] = 10;
  225. aa['fy1'] = 0;
  226. aa['fx1'] =  0.05 * player.scaleX;
  227. aa['d1'] = 8;
  228. aa['s1'] = 10;
  229. aa['m1'] = 0.05;
  230.  
  231.  
  232. i = 20;
  233. hi = 1;
  234. player.play("sair");
  235. ifAttack = true;
  236.  
  237.  
  238.  
  239.  
  240.                 }
  241.             }
  242.            
  243.             //up air
  244.                 if (Input.pressed("light") && Input.check("up") == true && Input.check("down") != true   && inAir == true ){
  245.        
  246.                            
  247. aa['x1'] = 36 * player.scaleX;
  248. aa['y1'] = -30;
  249. aa['w1'] = 10;
  250. aa['h1'] = 10;
  251. aa['a1']  = 20;
  252. aa['sf1'] = 10;
  253. aa['fy1'] = -.4 ;
  254. aa['fx1'] =  0.04 * player.scaleX;
  255. aa['d1'] = 2;
  256. aa['s1'] = 10;
  257.  
  258. aa['m1'] = 0.05;
  259.  
  260.  
  261. aa['x2'] = 26 * player.scaleX;
  262. aa['y2'] = -40;
  263. aa['w2'] = 10;
  264. aa['h2'] = 10;
  265. aa['a2']  = 20;
  266. aa['sf2'] = 10;
  267. aa['fy2'] = -.4 ;
  268. aa['fx2'] =  0 * player.scaleX;
  269. aa['d2'] = 2;
  270. aa['s2'] = 10;
  271.  
  272. aa['m2'] = 0.05;
  273.  
  274. aa['x3'] = 0 * player.scaleX;
  275. aa['y3'] = -40;
  276. aa['w3'] = 35;
  277. aa['h3'] = 10;
  278. aa['a3']  = 20;
  279. aa['sf3'] = 10;
  280. aa['fy3'] = -.4 ;
  281. aa['fx3'] =  0 * player.scaleX;
  282. aa['d3'] = 2;
  283. aa['s3'] = 10;
  284.  
  285. aa['m3'] = 0.05;
  286.  
  287. aa['x4'] = -36 * player.scaleX;
  288. aa['y4'] = -30;
  289. aa['w4'] = 10;
  290. aa['h4'] = 10;
  291. aa['a4']  = 20;
  292. aa['sf4'] = 10;
  293. aa['fy4'] = -.4 ;
  294. aa['fx4'] =  0 * player.scaleX;
  295. aa['d4'] = 2;
  296. aa['s4'] = 10;
  297.  
  298. aa['m4'] = 0.05;
  299.  
  300. aa['x5'] = -26 * player.scaleX;
  301. aa['y5'] = -40;
  302. aa['w5'] = 10;
  303. aa['h5'] = 10;
  304. aa['a5']  = 20;
  305. aa['sf5'] = 10;
  306. aa['fy5'] = -.4 ;
  307. aa['fx5'] =  0 * player.scaleX;
  308. aa['d5'] = 2;
  309. aa['s5'] = 10;
  310.  
  311. aa['m5'] = 0.05;
  312.  
  313.  
  314. i = 30;
  315. hi = 5;
  316. player.play("upair");
  317. ifAttack = true;
  318.    
  319.                
  320.             }
  321.            
  322.             //down air
  323.                 if (Input.pressed("light") && Input.check("up") != true && Input.check("down") == true && inAir == true ){
  324.        
  325.                    
  326.                    
  327.  
  328. aa['x1'] = -10 * player.scaleX + velocity;
  329. aa['y1'] = 30 + -velocityY;
  330. aa['w1'] = 5;
  331. aa['h1'] = 20;
  332. aa['a1']  = 10;
  333. aa['sf1'] = 0;
  334. aa['fy1'] =  0.3;
  335. aa['fx1'] =  0.002 * player.scaleX;
  336. aa['d1'] = 5;
  337. aa['s1'] = 20;
  338. aa['m1'] = 0;
  339.  
  340.  
  341. aa['x2'] = 10 * player.scaleX + velocity;
  342. aa['y2'] = 30 + -velocityY;
  343. aa['w2'] = 5;
  344. aa['h2'] = 20;
  345. aa['a2']  = 10;
  346. aa['sf2'] = 10;
  347. aa['fy2'] =  1;
  348. aa['fx2'] =  0 * player.scaleX;
  349. aa['d2'] = 5;
  350. aa['s2'] = 40;
  351. aa['m2'] = 0;
  352.  
  353.  
  354.  
  355.  
  356.  
  357. i = 20;
  358. hi = 2;
  359. player.play("dair");
  360. ifAttack = true;
  361.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement