Slam Script for the beginning

Well my friends...
Finally i make it work!

I make the final test:

I start mod  from 0.
Create a new folder only with a one player and enemy an erase the rest of enemys, players, entitys, misc, etc.
Now the script works perfect.
The real question is wath makes the openbor closes?
Only left test setting one by one the players, enemies and entities to find the source of the conflict.

I wanna say thanks for all people try to helpme,  really.

Now i need help to know wath used for these scripts:
anti
keyflip
limiter
leaper

Thanks!!!

 
Yeah that was the best thing to try and do.

For the other scripts, download them here and copy to data\scripts. 

Edit grabscript.c make a new line at the top and add this.

Code:
#include "data/scripts/script.c"

OR you can copy and paste the contents of script.c at the bottom of grabscript.c
 
Thanks, i im using script.c of Crime buster 2.5.
I need to know wath used for all these scripts:
anti
keyflip
limiter
leaper
degravity

And how create more falls for the slams?
The @cmd  finish only have 2.

Thanks!!!
 
Check the link, it's in the description, and it's all in ScriptU.txt
http://www.chronocrash.com/forum/index.php?topic=12.msg51#msg51

For the others you'll have to look in the crime busters mod, or ask Bloodbane, he wrote them.

---
#2 - well it will take editing the script, but what you want isn't too hard.
open the script in text editor.  Find the entry for finish.

THE ORIGINAL
Code:
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam or throw 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, "grabbing");
     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
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
     }

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


You want to edit this part
Code:
     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 1st Finisher
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
     }


Add your new entry below
Code:
     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 1st Finisher
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7")); // 3rd Finisher
     }


 
I need to know wath used for all these scripts:
anti
keyflip
limiter
leaper
degravity

anti was originally used to slam enemies with nodrop 1. Those enemies are strong against knockdown attacks and pushed back instead if they are knocked down.
Now, to make those enemies, we should use knockdowncount instead and update slamstart to knock down more.
Simply put, anti is outdated and you don't need it anymore.

keyflip is function to flip players by holding left or right to change direction to left or right respectively. You can use this in any moves (not just slams) which allow flipping

leaper is jumpframe without frame limit. IOW using leaper allows entities to jump more than once in animation

limiter is for preventing players to perform certain animation if their HP is not enough. If HP is indeed not enough, they will be returned to IDLE animation.
Yes, it's similar to what energycost does but this function only does the limiting part.

degravity as the name suggests, it cancels gravity effect, set 1 to set entity unaffected by gravity and set 0 to make it affected again.
In Crime Buster v2.5, it's for allowing some characters to float and stop couple seconds before moving. However, it's outdated by this function:

Code:
void floater( int Time )
{// Floats in Time centiseconds
    void self = getlocalvar("self");
    int eTime = openborvariant("elapsed_time");

    changeentityproperty(self, "tosstime", eTime + 2*Time);
}

This function does the float effect better and more stable.

Oh I'm not saying that degravity is useless. This function is best used in flight mode in which entity floats for variable time.

HTH
 
Thanks Bloodbane!

Works perfect!
Now a few questions:

1. Where can find the staydown and damageonlanding features via script?

2. Its possible use this features in a slam/throw script after @cmd finish/throw ?

3. Wath really used for antiwall script?

Thanks.
 
O Ilusionista said:
Wath really used for antiwall script?
to avoid you to slam enemies inside walls, for example.

Thanks!

Then...

1. Where can find the staydown and damageonlanding features via script?

2. Its possible use this features in a slam/throw script after @cmd finish/throw ?

3. Exist via script something like the hitfx freature to use in the @cmd finish?

4. I have a freespecial move combo ending with a slam script.
    Then i have 3 special bosses, the 3 cant be grabbed and one fo them have nodrop 1.
    How make to avoid the player execute the slam script over the three bosses?

Thanks.
 
1. Where can find the staydown and damageonlanding features via script?

There's script for staydown but you need to modify the functions for this.

Code:
     changeentityproperty(target, "staydown", "rise", 300);

300 means 3 seconds staydown IIRC

damageonlanding is already in the scripts you are using

Code:
     changeentityproperty(target, "damage_on_landing", Damage);

It's included in throw function.

2. Its possible use this features in a slam/throw script after @cmd finish/throw ?

Yes, but it's best to update finish and throw function instead :)

3. Exist via script something like the hitfx freature to use in the @cmd finish?

Well since you can guarantee that grabbed opponent will be 'damaged', you don't need hitfx and you can just use sound command at frame you declared finish function.

4. I have a freespecial move combo ending with a slam script.
    Then i have 3 special bosses, 2 can be grabbed and the other have nodrop 1.
    How make to avoid the player execute the slam script over the three bosses?

Well, you can modify slamstart function or add another function to declare before slamstart to check if character is attempting to grab correct enemy.

Hmmm.... 2 of them can be grabbed but not slammed/thrown? I think the latter is best solution

Anyways, you can either have a generic solution which might by useful in case you add more unslammable/unthrowable enemy in future or just a hardcoded function which specifically checks for certain enemies.
 
Sorry, i must say " the 3 cant be grabbed and one of them have nodrop 1"
Wath its the best solution, @cmd grabcheck?

- How use this features?
    changeentityproperty(target, "staydown", "rise", 300);
    changeentityproperty(target, "damage_on_landing", Damage);
  How set in the txt player?
  Its a @cmd ...

- And how can update finish and throw function?
 
Here's how to insert staydown to finish function:

Code:
void finish(int Damage, int Type, int x, int y, int z, int Face, int Stay)
{ // Damage as slam or throw 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, "grabbing");
     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
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
     }

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

NOTE: this function has another parameter added so if you have used this function, you have to update all of them adding staydown factor.

damageonlanding is already part of throw function. Do you want to add this to finish function too?

Sorry, i must say " the 3 cant be grabbed and one of them have nodrop 1"
Wath its the best solution, @cmd grabcheck?

Hmmm... do you prefer generic or specific solution?
 
1 - How make to set update all of them adding staydown factor?

2 - I no need add damageonlanding to finish function.

3 - I trust in you my friend, so give me the best solution, i have to learn to do it.


Now i make a rebuilding of my mod with every character, redoing all the specifics slam/throw moves with script.

So i am ready...
 
Okay, here's finish with added staydown and damageonlanding parameter:
Code:
void finish(int Damage, int Type, int x, int y, int z, int Face, int Stay, int Landdamage)
{ // Damage as slam or throw 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, "grabbing");
     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
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
     }

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

(the last 2 parameter defines staydown factor and damageonlanding)

and here's throw with added staydown and damageonlanding parameter:
Code:
void throw(int Damage, int Type, int x, int y, int z, int Face, int Stay)
{ // Damage as throw 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, "grabbing");
     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, 0, 1, openborconstant("ATK_NORMAL")); // 1st throw type
     }

     if(Type==2)
     {
       damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL9")); // 2nd throw type
     }

     if(Type==3)
     {
       damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL2")); // 3rd throw type, enemies can autoland here
     }

     changeentityproperty(target, "attacking", 1);
     changeentityproperty(target, "damage_on_landing", Damage);
     changeentityproperty(target, "projectile", 1);
     changeentityproperty(target, "direction", MDir);
     changeentityproperty(target, "staydown", "rise", Stay); 
     tossentity(target, y, x, z); // Toss opponent ;)
   }
}

(last parameter defines staydown)

As for anti-certain-boss script, let me make the script first, and in the mean time, why don't you post their name (not alias)? :)
 
Ok, after to update the script only one question left for me...

Where is setting this new features in the @cmd finish/throw?

Ej:

@cmd finish [1] [2] [3] [4] [5] [6] --- used to finish the slam
(use it at the end of the last slam frame)
(ex: @cmd    finish 25 2 -2 3 0 0)
[1] damage made by the slam (- less damage) (+ more damage)
[2] defines which FALL animation slammed opponent will play after slammed / 1 = Opponent plays FALL animation after being slammed / 2 = Plays FALL9 animation (ex: character's FALL9's, plays a simpler version of fall animation. This is used for Suplexs and most slam animation in which slammed opponent plays fallen poses).
[3]fall distance X axis -/+            
[4]fall altitude y axis -/+            
[5]fall depth z axis -/+            
[6] flips the fall animation 0 / 1
[7] .............................. ..............GOES HERE???            


Ahhh, my mod is MORTAL KOMBAT "THE CHOSEN"

I create a lot new characters with new powers, new bosses, Pit fighter characters and  one original character started to 0, like the Urban Lockdown. My own daughter.
The mod also have personal fatalities to every character for execute whe tne enemy have little rest of health.

I start the mod about 6 years ago, i left millions o time, but finally i wanna finish soon i hope.

The bosses cant be grabed are : Goro, Kintaro, Motaro.

And one more, the final Boss:  Kimokahn (edited), this have nodrop 1.

Thanks.
 
Ah that's just description for each function but if you need it:

@cmd  finish [1] [2] [3] [4] [5] [6] --- used to finish the slam
(use it at the end of the last slam frame)
(ex: @cmd    finish 25 2 -2 3 0 0)
[1] damage made by the slam (- less damage) (+ more damage)
[2] defines which FALL animation slammed opponent will play after slammed / 1 = Opponent plays FALL animation after being slammed / 2 = Plays FALL9 animation (ex: character's FALL9's, plays a simpler version of fall animation. This is used for Suplexs and most slam animation in which slammed opponent plays fallen poses).
[3]fall distance X axis -/+             
[4]fall altitude y axis -/+             
[5]fall depth z axis -/+             
[6] flips the fall animation 0 / 1
[7]staydown factor
[8]damageonlanding factor

Here's the anti-certain-boss script:

void cancelgrab()
{// Check grabbed opponent's name
// If it's forbidden to grab him/her, revert to IDLE
  void self = getlocalvar("self");
  void target = getlocalvar("Target" + self);

  if(target==NULL())
  {
    target = getentityproperty(self, "opponent");
    setlocalvar("Target" + self, target);
  }
  if(target!=NULL())
  {
    char Tname = getentityproperty(target, "defaultname");

    if(Tname == "Goro" || Tname == "Kintaro" || Tname == "Motaro" || Tname == "Kimokahn")
    {
      setidle(self);
    }
  }
}

Add this function to your animationscript
Declare it like this:

@cmd cancelgrab
@cmd slamstart

 
Thanks!

OK, then...

[7]staydown factor
To set this feature :  300 = 3 second  (this time apply on rise an riseattack or is like the normal staydown, 2 numbers, one for every situation =  rise 300 riseattack 350

[8]damageonlanding factor
To set this feature is like the normal damageonlading, 2 numbers?
Ej 10 (damage) 2 ( 1 = attackbox activated. 2 = attackbox  activated, opponents can perform land)

I edited the scripts adding staydown and damageonlanding, but when the character make a @cmd finish o throw the game crash. If i start the game without setting the new adds in finish or slam, the game crash too when i make @cmd finish o throw.

How must be setting this features

Ej:        @cmd  finish 30 3 0 -2 1.2 0  this is the finish before adding the new scripts and works perfect.
With the new 2 scripts the result is...? @cmd  finish 30 3 0 -2 1.2 0 500 500 10 1 (wrong)

The error in OpenBorLog is:
Runtime error: argument count( 8 ) doesn't match, check your function call: (null).
 
Back
Top Bottom