Guest User

animation fail

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