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:
And what I want to change is the knockdown (or pain, in another solution):
So I went with an script:
And I got the following error:
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
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:
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);
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);