Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(attackchoice == 4){ //Attack 4
- 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
- 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
- int TY[3]; //You may notice that special waitframe down there. That's what's drawing the combos, so adjust them there
- int TAngle;
- int TAngle2;
- int AttackDist = 64; //This is the total length of the bar of the attack
- int Segments = 8; //Adjust this number to whatever you think looks nice and let the magic of powers of division handle the rest!
- int Duration = 32; //How long moving the bar lasts
- float Speed = 3; //How fast the bar moves. Total distance the bar moves is Speed*Duration, so adjust accordingly.
- TAngle=Angle(Link->X, Link->Y, 120, 80)+90;
- Holm->CollDetection = false;
- Ghost_ForceDir(DIR_DOWN);
- Game->PlaySound(85);
- Ghost_Data = telecombo;
- HolmWaitframes(this, Holm, BaseDefenses, 8);
- TX[0]=120+VectorX(AttackDist/2, TAngle);
- TY[0]=80+VectorY(AttackDist/2, TAngle);
- Ghost_X=TX[0];
- Ghost_Y=TY[0];
- EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 8);
- Holm->CollDetection = true;
- Ghost_Data = standingcombo;
- Ghost_ForceDir(AngleDir4(Angle(Ghost_X, Ghost_Y, Link->X, Link->Y)));
- EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 12);
- Holm->CollDetection = false;
- Ghost_ForceDir(DIR_DOWN);
- Game->PlaySound(85);
- Ghost_Data = telecombo;
- HolmWaitframes(this, Holm, BaseDefenses, 8);
- TAngle2 = Angle(TX[0], TY[0], TX[1], TY[1]);
- TX[1]=TX[0]+VectorX(AttackDist, TAngle2);
- TY[1]=TY[0]+VectorY(AttackDist, TAngle2);
- Ghost_X=TX[1];
- Ghost_Y=TY[1];
- EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 8);
- Holm->CollDetection = true;
- Ghost_Data = standingcombo;
- Ghost_ForceDir(AngleDir4(Angle(Ghost_X, Ghost_Y, Link->X, Link->Y)));
- TX[2]=TX[0]+VectorX(AttackDist/2, TAngle2);
- TY[2]=TY[0]+VectorY(AttackDist, TAngle2);
- for(int i=0; i<90; i++){
- TAngle2+=3;
- for(g=0; g<=1; g++){
- TX[g]=TX[2]+VectorX(AttackDist/2, TAngle2+180*g);
- TY[g]=TY[2]+VectorY(AttackDist/2, TAngle2+180*g);
- }
- TAngle2=WrapAngle(TAngle2);
- if(Abs(TAngle2-Angle(TX[2], TY[2], Link->X, Link->Y))<=4)break;
- EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 1);
- }
- EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 60); //Set this to whatever you want the player to have to get out of the way
- TAngle-=90; //Remove the offset we originally used
- for(int i=0; i<Duration; i++){
- for(int g=0; g<=1; g++){
- TX[g]+=VectorX(Speed, TAngle2);
- TY[g]+=VectorY(Speed, TAngle2);
- }
- for(int g=1; g<Segments; g++){
- 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
- if(Distance(Link->X, Link->Y, TX[0]+VectorX(AttackDist/Segments*g, TAngle2), TY[0]+VectorY(AttackDist/Segments*g, TAngle2))<=14){
- eweapon e = FireEWeapon(EW_SCRIPT5, Link->X, Link->Y, DegtoRad(TAngle2), 0, ghost->Damage, SPR_BLANK, -1, EWF_UNBLOCKABLE);
- e->DrawYOffset=999;
- SetEWeaponLifespan(e, EWL_TIMER, 1);
- SetEWeaponDeathEffect(e, EWD_VANISH, 0);
- }
- }
- EvanHolmWaitframe(this, Holm, TX, TY, BaseDefenses, 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement