defense script

msmalik681

OpenBOR Developer
Staff member
i need a animation script to raise a entitys defense and another one to reset it is this possible ?
 
It should be simple, like this function:
void defense(float Def)
{// Sets defense value to main attacktype
    void self = getlocalvar("self");
    int DId = openborconstant("ATK_NORMAL");

    changeentityproperty(self,"defense", DId, Def);               
}

This function can be used to raise or lower defense to default attacktype.
 
It is a function to be added in animationscript. It's called like this:

@cmd defense 0

in an animation.
When the script is run, entity's defense to default attacktype will be 100% or IOW immune to that attacks.

Like most property change, this effect will last on until entity dies or its defense is changed by similar script.
 
Thanks bloodbane but setting the value of defense to a set amount is not what I need.  I want to raise the defense a little every time a certain animation is run.

Maybe i could run a script to increase a value then the defense is based on that value ? but then if 2 enemies share the same script they will check the same value and keep boosting each others defense so I guess that wont work.

maybe this script could have a "if" statements to set it to a low defense value but if its already that value then to move it to the next one up and so on ?  with this script 0=100% so can start at 10 then work down to 0 will that work ? 
 
Well, I'm not sure what is actually you want to make here so I can't say if it's going to work or not :)
 
Well when playing mortal kombat 9 I liked the balance for combos. the longer a combo I noticed the damage dropped down more the longer the combo this is good as a full lifebar can be taken in 1 combo.

What I want is a script to increase the defence every time fall/pain animation is played and reset every time a rise/idle animation is run. This way I wont worry about infinite combos as at some point damage will stop.
 
So, basically, you want to do a  damage dampener, like we do in Mugen, right?
The longer the combo, less damage each hit will do.
 
I would think it better to dampen the attacker's offense instead of jacking up the defender's defense. Easier to implement (you could base it on number of combo hits which the engine already tracks) and make more sense from a meta standpoint (i.e. you get weary and worn down taking swing after swing, you don't magically get tougher when someone is hitting you!).

Plus, it would encourage cooperation,a s multiple players would be able to do far more damage tag teaming their combos than single player could alone, whereas the opposite would be true if you kept upping the defender's defense.

DC



 
Malik, I am a pretty newbie on BOR, but I am reading all the manual for some days, and I think I found it:

offense all 0.75

offense {type} {factor}

~Modifies damage output of given attack type by {factor}.
~For example: "offense shock 0.5" will decrease shock attacks to 50%, whereas "offense burn 1.5" will increase burn attacks to 150%.
~{factor} could be negative and make the attack give HP instead. For example: -1 makes the attack to give HP to opponent instead of damaging.
~Accepted types are:
all (all attacktypes are affected)
normal# (replace # with appropriate attacktype number)
shock
burn
steal
blast
freeze (only affects damage, freeze effect remains)

http://dcemulation.org/index.php5?title=OpenBORManual#Offense_.26_Defense
 
Back
Top Bottom