Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. if(attackchoice == 4){ //Attack 4
  2. for(int cycles=0; cycles<6; cycles++){ //Set this to however many times you want him to preform the attack. Currently I have him set to preform it 6 times in succession to allow you to easily test how it looks relative to various positions the player can be in
  3. int TX[3]; //0 is the first teleport point, 1 is the second. Combos will be drawn on these as the "end points" of the attack, which will probably not only look good, but will function as a tell while he's setting it up. 2 is going to be the middlepoint of the attack
  4. int TY[3]; //You may notice that special waitframe down there. That's what's drawing the combos, so adjust them there
  5. int TAngle;
  6. int TAngle2;
  7. int AttackDist = 64; //This is the total length of the bar of the attack
  8. int Segments = 8; //Adjust this number to whatever you think looks nice and let the magic of powers of division handle the rest!
  9. int Duration = 32; //How long moving the bar lasts
  10. float Speed = 3; //How fast the bar moves. Total distance the bar moves is Speed*Duration, so adjust accordingly.
  11.  
  12. TAngle=Angle(Link->X, Link->Y, 120, 80)+90;
  13.  
  14. Holm->CollDetection = false;
  15. Ghost_ForceDir(DIR_DOWN);
  16. Game->PlaySound(85);
  17. Ghost_Data = telecombo;
  18. HolmWaitframes(this, Holm, BaseDefenses, 8);
  19. TX[0]=120+VectorX(AttackDist/2, TAngle);
  20. TY[0]=80+VectorY(AttackDist/2, TAngle);
  21. Ghost_X=TX[0];
  22. Ghost_Y=TY[0];
  23. EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 8);
  24. Holm->CollDetection = true;
  25. Ghost_Data = standingcombo;
  26. Ghost_ForceDir(AngleDir4(Angle(Ghost_X, Ghost_Y, Link->X, Link->Y)));
  27. EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 12);
  28. Holm->CollDetection = false;
  29. Ghost_ForceDir(DIR_DOWN);
  30. Game->PlaySound(85);
  31. Ghost_Data = telecombo;
  32. HolmWaitframes(this, Holm, BaseDefenses, 8);
  33. TAngle2 = Angle(TX[0], TY[0], TX[1], TY[1]);
  34. TX[1]=TX[0]+VectorX(AttackDist, TAngle2);
  35. TY[1]=TY[0]+VectorY(AttackDist, TAngle2);
  36. Ghost_X=TX[1];
  37. Ghost_Y=TY[1];
  38. EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 8);
  39. Holm->CollDetection = true;
  40. Ghost_Data = standingcombo;
  41. Ghost_ForceDir(AngleDir4(Angle(Ghost_X, Ghost_Y, Link->X, Link->Y)));
  42. TX[2]=TX[0]+VectorX(AttackDist/2, TAngle2);
  43. TY[2]=TY[0]+VectorY(AttackDist, TAngle2);
  44. for(int i=0; i<90; i++){
  45. TAngle2+=3;
  46. for(g=0; g<=1; g++){
  47. TX[g]=TX[2]+VectorX(AttackDist/2, TAngle2+180*g);
  48. TY[g]=TY[2]+VectorY(AttackDist/2, TAngle2+180*g);
  49. }
  50. TAngle2=WrapAngle(TAngle2);
  51. if(Abs(TAngle2-Angle(TX[2], TY[2], Link->X, Link->Y))<=4)break;
  52. EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 1);
  53. }
  54. EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 60); //Set this to whatever you want the player to have to get out of the way
  55. TAngle-=90; //Remove the offset we originally used
  56.  
  57. for(int i=0; i<Duration; i++){
  58. for(int g=0; g<=1; g++){
  59. TX[g]+=VectorX(Speed, TAngle);
  60. TY[g]+=VectorY(Speed, TAngle);
  61. }
  62. for(int g=1; g<Segments; g++){
  63. Screen->FastCombo(2, TX[0]+VectorX(AttackDist/Segments*g, TAngle2), TY[0]+VectorY(AttackDist/Segments*g, TAngle2), 3044 ,Ghost_CSet,OP_OPAQUE); //Change the 3044 to whatever you want the damage combo to be
  64. if(Distance(Link->X, Link->Y, TX[0]+VectorX(AttackDist/Segments*g, TAngle2), TY[0]+VectorY(AttackDist/Segments*g, TAngle2))<=14){
  65. eweapon e = FireEWeapon(EW_SCRIPT5, Link->X, Link->Y, DegtoRad(TAngle2), 0, ghost->Damage, SPR_BLANK, -1, EWF_UNBLOCKABLE);
  66. e->DrawYOffset=999;
  67. SetEWeaponLifespan(e, EWL_TIMER, 1);
  68. SetEWeaponDeathEffect(e, EWD_VANISH, 0);
  69. }
  70. }
  71. EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 1);
  72. }
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement