Advertisement
Guest User

Animation fail

a guest
Apr 27th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let counter1=0;
  2. let counter2=0;
  3. let counter3=0;
  4. let graphicangle=0;
  5. let wave=0;
  6. let turnframe1=0;
  7. let turnframe2=0;
  8.  
  9. @DrawLoop{
  10.  
  11. //Fairy Graphic
  12.  
  13. SetTexture(fairygraphic);
  14. SetGraphicScale(1,1);
  15. SetAlpha(255);
  16.  
  17. if(GetSpeedX>0 && counter1==0){
  18. Animate("fairy","turntomove",false);
  19. graphicangle=0;
  20. counter1++;
  21. counter2=0;
  22. counter3=1;
  23. turnframe1=0;
  24. turnframe2=0;}
  25.  
  26. if(GetSpeedX<0 && counter2==0){
  27. Animate("fairy","turntomove",false);
  28. graphicangle=180;
  29. counter2++;
  30. counter1=0;
  31. counter3=1;
  32. turnframe1=0;
  33. turnframe2=0;}
  34.  
  35. if(GetSpeedX==0 && counter3==0){
  36. Animate("fairy","idle",true);
  37. counter3=10;
  38. counter2=0;
  39. counter1=0;
  40. turnframe1=0;
  41. turnframe2=0;}
  42.  
  43. if(GetSpeedX!=0 && turnframe1<12){
  44.  
  45. turnframe1++;
  46.  
  47. }
  48.  
  49. if(GetSpeedX==0 && counter3==1 && turnframe2<12){
  50. turnframe2++;
  51. }
  52.  
  53. if(turnframe1>10){
  54.  
  55. if(counter1==1){
  56. Animate("fairy","move",true);
  57. counter1++;}
  58.  
  59. if(counter2==1){
  60. Animate("fairy","move",true);
  61. counter2++;}
  62.  
  63. }
  64.  
  65. if(turnframe2>1 && counter3==1){
  66. Animate("fairy","turntoidle",false);
  67. counter3++;}
  68.  
  69. if(turnframe2>10 && counter3==2){
  70. counter3=0;}
  71.  
  72. SetColor(255,255,255);
  73. SetGraphicAngle(graphicangle,0,0);
  74.  
  75. DrawAnimatedSprite("fairy", GetX, GetY);
  76.  
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement