* *
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2017, 07:22:47 PM

Login with username, password and session length

runjump and freespecial

  • 16 Replies
  • 2866 Views
*

Offline jonsilva

  • Sr. Member
  • ****
  • 417
  • Banned
Re: runjump and freespecial
« Reply #15 on: December 23, 2014, 12:13:33 PM »
theres no need fo hop/toss/jump again  ;D

but its best to keep the altitude velocity a costum number depending on the slam it performs

using this script you can change altitude and keep the original velocity x from runjump/jump
Quote
void airgo(float Vely)
{// Leap with previously attained speed!
    void self = getlocalvar("self");
    int dir = getentityproperty(self,"direction");

   float Vx = getentityvar(self, 5); //velocity x

       if(dir==0){ // Facing left?
         Vx = -Vx ;
       }
    tossentity(self, Vely, Vx); //Move!
}

anim runjump
Quote
anim   runjump
@script
    void self = getlocalvar("self");
    setentityvar(self, 5, 3.5);
@end_script
   loop   0
   delay   6
   offset   100 189
   bbox   79 95 50 50
   cancel   5 20 0 s freespecial20
   cancel   5 20 0 d s freespecial21
   cancel   5 20 0 u s freespecial25
   frame   data/chars/3mrkarate/fall15.gif
   frame   data/chars/3mrkarate/fall13.gif
   frame   data/chars/3mrkarate/fall12.gif
   frame   data/chars/3mrkarate/fall11.gif
   frame   data/chars/3mrkarate/fall10.gif
   delay   2
   frame   data/chars/3mrkarate/jump02.gif #5
   frame   data/chars/3mrkarate/jump02.gif
   frame   data/chars/3mrkarate/jump02.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif
   frame   data/chars/3mrkarate/jump05.gif #20

air slam pile driver
Quote
anim   freespecial21
   loop   0
   delay   2
   offset   100 189
   bbox   0 0 0 0
   @cmd   airgo
   followanim   4
   followcond   1
   landframe    5
   hitfx   data/sounds/grab.wav
   attack 0 0 0 0
   frame   data/chars/3mrkarate/6grab01.gif
   delay   35
   attack10 90 85 65 40 0 1 1 1 25 20
   dropv   3 0
   frame   data/chars/3mrkarate/6grab01.gif
   attack10 0 0 0 0
   delay   7
   frame   data/chars/3mrkarate/jump05.gif
   @cmd   anichange "ANI_JUMP"
   frame   data/chars/3mrkarate/jump05.gif
   delay   500
   frame   data/chars/3mrkarate/jump05.gif
   delay   12
   frame   data/chars/3mrkarate/rise4.gif




anim   follow4
   loop   0
   delay   20
   offset   100 185
   bbox   0 0 0 0
   @cmd   airgo 4 <-- jumps 4 in altitude
   landframe   4 dust
   @cmd   slamstart2
   @cmd   position 12 30 80 -1 1
   frame   data/chars/3mrkarate/4grab07.gif
   delay   15
   offset   110 170
   @cmd   position 3 30 60 -1 1
   frame   data/chars/3mrkarate/4grab08.gif
   offset   115 171
   @cmd   position 15 10 50 -1 -1
   frame   data/chars/3mrkarate/4grab10.gif
   delay   300
   @cmd   position 14 10 50 -1 -1
   frame   data/chars/3mrkarate/4grab11.gif
   delay   12
   @cmd   spawn01 "qfx" 40 1 1
   @cmd   position 15 10 50 -1 -1
   frame   data/chars/3mrkarate/4grab12.gif #4
   @cmd   position 14 10 50 -1 -1
   frame   data/chars/3mrkarate/4grab13.gif
   @cmd   depost 0
   @cmd   finish 55 1 -1 5 0 0
   delay   8
   offset   115 160
   frame   data/chars/3mrkarate/4grab12.gif
   frame   data/chars/3mrkarate/4grab13.gif
   offset   100 189
   frame   data/chars/3mrkarate/rise1.gif
   frame   data/chars/3mrkarate/rise2.gif
   frame   data/chars/3mrkarate/rise3.gif
   frame   data/chars/3mrkarate/rise4.gif
http://youtu.be/dH4sbH7zgxI?list=UUrm294XWVzDEqKHpYF45Kmw

using tossx script theres no small leap up during the slam... as i posted above

in here the slams go right on to the floor once they start
http://youtu.be/GXZAx6RLxS0?list=UUrm294XWVzDEqKHpYF45Kmw

Banned

*

Offline msmalik681

  • Hero Member
  • *****
  • 866
Re: runjump and freespecial
« Reply #16 on: December 07, 2017, 02:59:08 AM »
Sorry to bring up such a old post but I was looking over the source code and I think I found where the x velocity is stopped.

Code: [Select]
// make a function so enemies can use
// UT: jumphack is a temporary fix for jump cancel
int check_costmove(int s, int fs, int jumphack)
{
    if(((fs == 1 && level->nospecial < 2) || (fs == 0 && level->nospecial == 0) || (fs == 0 && level->nospecial == 3)) &&
            (check_energy(COST_CHECK_HP, s) ||
             check_energy(COST_CHECK_MP, s))  )
    {
        if(!jumphack)
        {
            self->takeaction = common_attack_proc;
        }
        if(!nocost && !healthcheat)
        {
            if(self->modeldata.animation[s]->energycost)
            {
                if(check_energy(COST_CHECK_MP, s))
                {
                    self->mp -= self->modeldata.animation[s]->energycost->cost;
                }
                else
                {
                    self->health -= self->modeldata.animation[s]->energycost->cost;
                }
            }
        }


        self->velocity.x = self->velocity.z = 0;
        set_attacking(self);
        self->inpain = 0;
        self->inbackpain = 0;
        memset(self->combostep, 0, sizeof(*self->combostep) * 5);
        ent_unlink(self);
        ent_set_anim(self, s, 0);
        return 1;
    }
    return 0;


if this line: "self->velocity.x = self->velocity.z = 0;" was removed I think it would fix the lost momentum.  if someone wanted to stop momentum during a jump cancel it is very easy to do but to re-apply it is not impossible but a lot more complicated as you cant tell at what point player will cancel and there is no script to activate on a cancel if this is correct I would like to apply this simple fix.
« Last Edit: December 07, 2017, 06:04:39 AM by msmalik681 »

 

Recent

Members
Stats
  • Total Posts: 47432
  • Total Topics: 3255
  • Online Today: 38
  • Online Ever: 316
  • (January 04, 2013, 09:43:02 AM)
Users Online
Users: 5
Guests: 28
Total: 33