Super Armor

O Ilusionista

Captain 100K
I want to make a Super Armor effect in one character but I want to do it using script, since it will be valid only in one palette.
I remember someone (I think it was DC) saying me to change the "defense" entityproperty but I still don't get how, since it would change the factor (the resistance) of an attack:
"defense" - Return one of the defense factors of this entity. Follow by an integer specifies the attack type(see 'openborconstant', and also 'changeentityproperty').

And what I want to change is the knockdown (or pain, in another solution):
defense {type} {factor} {pain} {knockdown} {blockpower} {blockthreshold} {blockratio} {blocktype}

So I went with an script:
Code:
	@script
	void self = getlocalvar("self");
	changeentityproperty(self, "knockdowncount", 20);
	@end_script

And I got the following error:
Unknown knockdowncount subproperty.
Script function 'changeentityproperty' returned an exception, check the manual for details.

The manual says that we can change this property, but seams that is not true (I added it to the manual and I think I made a mistake when I was taking a look into the source code).

How can I make this? I would like to make the player to or endure more against knockdown attacks or even endure more against hits (kinda like Hulk does), so it will enter in his pain animation just if an attack is strong enough.

Edit: I've found a code made by Bloodbane about this
Code:
 changeentityproperty(self, "defense", openborconstant("ATK_NORMAL"), 1, 0, 1);
The manual says "Return one of the defense factors of this entity" but we have 3 of them here. Are them FACTOR, PAIN and KNOCKDOWN? And how do I make it work against all attacks? "ALL"?

I've tried the code above and it works (the character won't enter into pain state for example). Also, I've found some info in OpenBorStats:

Get Defense setting:

void    vEnt    = getlocalvar("self");                                          //Caller.
int    iTyp    = openborconstant("ATK_NORMAL");                                //Normal type constant.

float fFac = getentityproperty(vEnt, "defense", iTyp, "factor" );  //Get factor.
int iPai = getentityproperty(vEnt, "defense", iTyp, "pain"            );  //Get pain.
float fKno = getentityproperty(vEnt, "defense", iTyp, "knockdown",      );  //Get knockdown.
int fBpo = getentityproperty(vEnt, "defense", iTyp, "blockpower",      );  //Get block power.
int iThr = getentityproperty(vEnt, "defense", iTyp, "blockthreshold" );  //Get threshold.
float fRai = getentityproperty(vEnt, "defense", iTyp, "blockratio",      ); //Get block ratio.
int iBty = getentityproperty(vEnt, "defense", iTyp, "blocktype",      );  //Get block type.

Change Defense setting:

void vEnt = getlocalvar("self"); //Caller.
int iTyp = openborconstant("ATK_NORMAL"); //Normal type constant.
float fFac = 0.5; //Get factor.
int iPai = 0; //Get pain.
float fKno = 1; //Get knockdown.
int fBpo = 0; //Get block power.
int iThr = 0; //Get threshold.
float fRai = 0; //Get block ratio.
int iBty = 0; //Get block type.

changeentityproperty(vEnt, "defense", iTyp, fFac, iPai, fKno, fBpo, iThr, fRai, iBty);
 
but we have 3 of them here. Are them FACTOR, PAIN and KNOCKDOWN?

Yes
Though it doesn't prevent prevent getting knocked down if hit while in mid air though

And how do I make it work against all attacks? "ALL"?

You'd need to set one for each attacktype such as:

Code:
changeentityproperty(self, "defense", openborconstant("ATK_NORMAL"), 0, 200,01);
changeentityproperty(self, "defense", openborconstant("ATK_NORMAL2"), 0, 200,01);
changeentityproperty(self, "defense", openborconstant("ATK_NORMAL3"), 0, 200,01);
changeentityproperty(self, "defense", openborconstant("ATK_SHOCK"), 0, 200,01);

and so on...
 
Bloodbane is correct - you need to set up the factors individually. Alternitavly, to create an exact replica of Capcom's Super Armor, you could use the dohit event. This event fires on both the attacker and defender when a hit collision is detected, directly before the engine begins processing how to handle the hit.

It would be a bit complex, but more or less you can detect an incoming hit before the engine processes it, and decide what you want to do. If certain conditions are met, like maybe a counter or timer you have set up, you do a flash and then cancel the hit so it never happens so far as the engine is concerned. Just like the Marvel Vs. Games.

DC
 
Back
Top Bottom