Problem with BBoxes in custom throws (ani0020.h)

  • Thread starter Thread starter RetroRic
  • Start date Start date
R

RetroRic

Guest
Hi Guys, 

I've picked up a script on here by Damon Caskey for performing custom slams etc.

This is the code i'm using for this particular throw:

void throw(int Damage, int Type, int x, int y, int z, int Face)
{ // 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_NORMAL5")); // 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_BURN")); // 3rd throw type
    }

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

I have managed to implement this and my throw is working well, the attack boxes are activated and enemies get knocked over by the thrown enemy.

The problem i'm having is that I want juggling to be a big part of the mod and for whatever reason the thrown enemy is not completely juggleable.  Once an enemy is thrown it is possible to hit this enemy's bbox but his flight path remains unchanged except that the enemy flips direction.

What I'm looking for is a way to make the enemy react just like he's being hit out of the air.  I'm not sure if I need to add something to Damon's code or add new code somewhere else to effect this change.

If anyone could shed light on this I would be most greatful.

just incase you need to know the code on the throw animation frame it is this:

@cmd position 0 32 0 0 -1
@cmd depost 0
@cmd throw 30 1 -1 4 0 0

Thanks again.
 
That's not my code; it looks like Bloodbane's script. My slam system does accomidate juggling, though I would guess this one does too if you set it up right. He should chime in with some answers in the next day or two, so stand by.

DC
 
Ah sorry man, I just found the ani0020.h file and your name appears near the top of it, maybe it's a bundle of different code by different folk?

Thanks for the info, looking forward to nailing this.
:)
 
ani0020 is mine, but what you posted isn't. Someone probably took my file and re wrote all the code in it without renaming the file itself. That's my guess anyway. Either way, I'm simply not familiar with what you posted. If Bloodbane doesn't see it or it isn't his either, I'll decipher it for you and see what I can do to help.

DC
 
That function is throw function I made for Crime Buster v2.5. It has been modified though

Anyways, as for your problem, it's because any entities knocked down with damageonlanding {damage} 1 set CAN'T be juggled (scripted or not scripted). You can hit them but can't alter it's flight path.
This bug has been there since I made that function

IOW sorry, I can't help you :)
 
Hi Bloodbane,

Thanks for your response.  Sorry, i'm a designer by trade and coding/scripting is a bit of a bad area for me.

Am I correct in assuming that the {damage} 1 in damageonlanding references the first value in the animation frame script (in this case 30):

@cmd throw 30 1 -1 4 0 0

Does the juggling stop working because {damage} is in the script or is it just damageonlanding in general?

cheers

 
Am I correct in assuming that the {damage} 1 in damageonlanding references the first value in the animation frame script (in this case 30):

Yes, {damage} refers to Damage parameter in throw function

Does the juggling stop working because {damage} is in the script or is it just damageonlanding in general?

My memory is vague about that, I'm guessing it's because of the 2nd parameter

  changeentityproperty(target, "damage_on_landing", Damage, 1);

However, I'm pretty sure that it has nothing to do with damage setting
 
Back
Top Bottom