Rise time question.

PS_VITA

Active member
Hi, I'm looking for a solution so that whenever I knock down an enemy with a weaker punch , the enemy recovers quickly  instead of using his default risetime 135 -50 header setting.

I would atleast need it to be half of that time and have him get up faster.

Any ideas are welcomed.

Thanks

 
A quick solution is using different attack types, since they can trigger different rise animations.
RISE{#} {players, enemies}

Played when an entity who has fallen down gets back up normally after being knocked down or thrown. However, entities could play RISEATTACK instead of this if certain conditions are met (see RISEATTACK below).
{#} determines the number of RISE animation. The accepted numbers are 2 to 10 and empty. There's no space between RISE and {#}. Empty means just RISE without number.
This animation is used in conjuction with attack{#}. Example: RISE2 will be played if entity was falling in FALL2 animation before.
RISE is mandatory while RISE2, RISE3 etc are optional.
If required RISE{#} is not available, RISE will be used instead.
 
Damon Caskey said:
Look up staydown. It does exactly what you are asking for.

Both are great solutions,
But I never heard of staydown and I honestly would have skipped it if I had seen it in the manual because of the name.

Could someone give me a simple example of how's it used?

I should be able to play with this on Saturday but if anyone has used this function before please let me know.

My initial guess, is that I can use it

With a freespecial attack?

Example:

Anim Freespecial30
Loop 0
Offset 0 0
Box 50 40 30 100
Delay 5
Data frame/char/billy/ punch.png
Attack 50 40 50 40  1 1 1 1
Staydown 10


Something along those lines?


Edit: wow, there's plenty of documentation in this forum about staydown :)

My only problem will probably be that my attack is using a script called finish that hurts the enemy via script so I'm unsure if staydown will work.

 
Damon Caskey said:
Look up staydown. It does exactly what you are asking for.

Damon Caskey duh, I totally forgot about this!

staydown {rise} {riseattack}

Gives more or less delay to opponent's rise and riseattack.
{rise} defines how much time in centiseconds to be added or subtracted from opponent's rise time for next rise.
{riseattack} defines how much additional time in centiseconds before opponent's next riseattack.
Both effect are gone once opponent rises or riseattacks.
Use this with knockdown attack of course. If this is used by non knockdown attack, the effect won't show itself until hit entity is knockeddown by other attack.

My only problem will probably be that my attack is using a script called finish that hurts the enemy via script so I'm unsure if staydown will work.
No, it won't. As we explained before, with scripts you have full control of what is going on. And that is - YOU have the full control of what is going on.
The engine will do exactly what - and only what* - you tell it to do.

(*not 100% true, but you get the idea)
 
O Ilusionista said:
Damon Caskey said:
Look up staydown. It does exactly what you are asking for.

Damon Caskey duh, I totally forgot about this!

staydown {rise} {riseattack}

Gives more or less delay to opponent's rise and riseattack.
{rise} defines how much time in centiseconds to be added or subtracted from opponent's rise time for next rise.
{riseattack} defines how much additional time in centiseconds before opponent's next riseattack.
Both effect are gone once opponent rises or riseattacks.
Use this with knockdown attack of course. If this is used by non knockdown attack, the effect won't show itself until hit entity is knockeddown by other attack.

My only problem will probably be that my attack is using a script called finish that hurts the enemy via script so I'm unsure if staydown will work.
No, it won't. As we explained before, with scripts you have full control of what is going on. And that is - YOU have the full control of what is going on.
The engine will do exactly what - and only what* - you tell it to do.

(*not 100% true, but you get the idea)

Okay understood... I'm back to being like whinnie the pooh right now.

Just thinking...


Hmmm

Okay, I'll post later If I found a solution.
 
PS VITA said:
my attack is using a script called finish that hurts the enemy via script so I'm unsure if staydown will work

You'd need to modify your finish function adding staydown setting in it. Like this:
Code:
void finish(int Damage, int Type, int x, int y, int z, int Face, int Rise)
{ // Damage as slam finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   int SDir = getentityproperty(target,"direction");
   int MDir;

   if(Face==0){ // Same facing?
       MDir = SDir;
   }

   if(Face==1){ // Opposite facing?

     if(SDir==0){ // Facing left?
       MDir = 1;
     } else { MDir = 0;}
   }

   if(target==NULL())
   {
     target = getentityproperty(self, "opponent");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
     if(dir==0){ // Facing left?
       x = -x;
     }

     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 1st Finisher
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "staydown", "rise", Rise); 
     changeentityproperty(target, "direction", MDir);
   }
}
 
Bloodbane said:
PS VITA said:
my attack is using a script called finish that hurts the enemy via script so I'm unsure if staydown will work

You'd need to modify your finish function adding staydown setting in it. Like this:
Code:
void finish(int Damage, int Type, int x, int y, int z, int Face, int Rise)
{ // Damage as slam finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   int SDir = getentityproperty(target,"direction");
   int MDir;

   if(Face==0){ // Same facing?
       MDir = SDir;
   }

   if(Face==1){ // Opposite facing?

     if(SDir==0){ // Facing left?
       MDir = 1;
     } else { MDir = 0;}
   }

   if(target==NULL())
   {
     target = getentityproperty(self, "opponent");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
     if(dir==0){ // Facing left?
       x = -x;
     }

     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 1st Finisher
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "staydown", "rise", Rise); 
     changeentityproperty(target, "direction", MDir);
   }
}


Absolutely  perfect!

Thank you Bloodbane ,
It's amazing how just one line of code was needed for the script to work perfectly.

 
Back
Top Bottom