How to change the value of knockdowncount?

16-bit Fighter

Active member
I don't understand why these lines work

Code:
changeentityproperty(self, "nopain", 1);
changeentityproperty(self, "nodrop", 1);

but not this one
Code:
changeentityproperty(self, "knockdowncount", 1);

It makes the engine exit.
Do you have an idea what is wrong, please?
 
16-bit Fighter said:

16-bit Fighter & O Ilusionista,

Knockdowncount is not a single property. You have to provide the sub-property you want to read or set.

Code:
getentityproperty({ent}, 'knockdowncount', {subproperty});

changeentityproperty({ent}, "knockdowncount", {subproperty}, {value});

Sub-properties:
  • current
  • max
  • time

HTH,
DC
 
Thank you!

The line changeentityproperty(self, "knockdowncount", "current", 0); works but not like I would like to.
Thus I have a new question. I'm trying to make an ennemy's midair attack unstopable unless the player performs an attack with a power of 1 or more. I discovered that setting "knockdowncount" to 1 is pointless in this case... So what's the solution?
 
I've made some trial n errors and found the solution  ;D.

1st, you need to set this script in enemy's JUMPATTACK:
Code:
anim	jumpattack
@script
  if(frame==0){
    void self = getlocalvar("self");

    changeentityproperty(self, "nopain", 1);
    changeentityproperty(self, "nodrop", 2);
  }
@end_script

and this script in enemy's JUMPLAND
Code:
anim	jumpland
@script
  if(frame==1){
    void self = getlocalvar("self");

    changeentityproperty(self, "nopain", 0);
    changeentityproperty(self, "nodrop", 0);
  }
@end_script

2nd, save this script in data/scripts folder:
airknock.c
Code:
void main()
{// Anti air knockdown script
// Allows knockdown for stronger knockdown attack
    void self = getlocalvar("self"); //Get calling entity.
    void Opp = getlocalvar("attacker"); //Get attacker
    int Knock = getlocalvar("drop");

    if(Opp != self && Knock >= 1){
      changeentityproperty(self, "nopain", 0);
      changeentityproperty(self, "nodrop", 0);
      damageentity(self, self, 0, 20, openborconstant("ATK_NORMAL"));
    }
}

3rd, declare it in enemy's header with:
takedamagescript data/scripts/airknock.c

With this set, enemy's jump attack can't be cancelled by non-knockdown attack.

HTH
 
Hi,

I'm trying something similar as in the enemy "oharra3" only get to be knock down if the
player's attack = to 35 or greater ( sorta like the manual explains it)

So how do I set it up properly .... I tried the bottom set up but It's not working for me.

I also have no clue what this quote means

"Knockdowncount is not a single property. You have to provide the sub-property you want to read or set."


Code:
name	oharra3
health	400
speed	19
type	enemy
shadow	1
nolife        1
grabdistance 40
jumpheight 8
jumpspeed 27
antigravity -100
falldie 2
nodieblink      3
noquake 1 1
riseattacktype 3
knockdowncount 35


Never mind it's the actual player knock down value that has to be modified.
 
PS VITA, knockdowncount give resistance against knock down. It doesn't specify how much damage it should receive before entity is knocked down. It only specify how much knockdown power is needed to knock down this entity.

If you want say, attack damage at least 35 to knockdown Oharra, you'd need to use takedamagescript.
 
Bloodbane said:
PS VITA, knockdowncount give resistance against knock down. It doesn't specify how much damage it should receive before entity is knocked down. It only specify how much knockdown power is needed to knock down this entity.

If you want say, attack damage at least 35 to knockdown Oharra, you'd need to use takedamagescript.

Thanks Bloodbane ,

Yes thanks to a combination of your super armor script and knockdowncount I was able to achieve the results I wanted.

 
Back
Top Bottom