Infinity MUGEN Team

IMT Main => M.U.G.E.N Help => Topic started by: Saohc on March 15, 2010, 11:44:53 PM

Title: Defense boost when up against a certain character..
Post by: Saohc on March 15, 2010, 11:44:53 PM
I'm still working on my full game and I'm trying to make it where if one of my characters(LucasX3(Dark) encounters a certain character,the character(LucasX3(Dark) gets a defense boost..

It's for a full game I'm making, can someone help me?
Title: Re: Defense boost when up against a certain character..
Post by: ATiC3 on March 16, 2010, 01:50:38 AM
I know you can make a special taunt for when meeting certain characters... but I don't know about... defense boosts... I think what you would have to do is make a code for when you meet a certain character... your health percentage increases... increasing defense somewhat... Idk the code though...
Title: Re: Defense boost when up against a certain character..
Post by: MirageAtoli on March 16, 2010, 01:55:01 AM
You could have your attacks deal less damage, depending on who you opponent is. That wont work in simul though.

Another option, is to have every attack send the opponent into a custom state that detects which character he is, and deals himself extra damage accordingly.
Title: Re: Defense boost when up against a certain character..
Post by: Fallen_Angel on March 17, 2010, 12:03:50 AM
What Mirage atoli says is correct, you can simulate having a bigger defense, by reducing the enemy attack....to fix the simul mode error, there is a trigger named enemynear...let me put an example

[State -2, VarSet]   
type = VarSet
trigger1 = enemynear,name ="kfm"
var(15)=1

if you do it like in the example, setting a  variable on statedef -2.....in the hitdef use these

damage =19-Var(15)  ; so you will reduce the damage by 1 (if you change the valjue on the var, the damage will be reduced by that amount)
Title: Re: Defense boost when up against a certain character..
Post by: MirageAtoli on March 17, 2010, 04:30:25 PM
What Mirage atoli says is correct, you can simulate having a bigger defense, by reducing the enemy attack....to fix the simul mode error, there is a trigger named enemynear...let me put an example

[State -2, VarSet]   
type = VarSet
trigger1 = enemynear,name ="kfm"
var(15)=1

if you do it like in the example, setting a  variable on statedef -2.....in the hitdef use these

damage =19-Var(15)  ; so you will reduce the damage by 1 (if you change the valjue on the var, the damage will be reduced by that amount)

I don't think that will work if hitting two enemies simultaneously. In this case if you use an attack that hits multiple players (say a beam) the opponent who shouldn't have damage resistance will take less damage if the other damage-resisting opponent is closer.

It may be better to have every move cause a custom state (that appears to be a regular hitstate) that deals damage.
Title: Re: Defense boost when up against a certain character..
Post by: Fallen_Angel on March 18, 2010, 11:36:20 AM
If you make a custom state for evey attack, its not an efficient code, because, you will have to create atleast 15 custom states, and you will override the defense parameter (because you will be directly manipulate the health of the opponent, so you will make chars that doenst have a standard defense ,not work properly)

If you are going to use a custom state for each move...you could simplify it, with just one custom state....if you create a helper on each hit  statedef (you will only need one, and modify the id for each attack), in the custom state, you can modify every action, relating it to the helper id (using trigerall = enemy,numhelper(id)=1).

I dont know if these could work (In theory it should, but I havent tested it), to solve the damage issue..... you could bind a helper (these helper will be created as soon as the beam is launched, its going to be a child helper) to the enemy that will get the defense boost, and when the beam (parent helper), almost hit the characte, the child helper will change to an attack state (trigger1=parentdist x =1 &&parentdist y=[-2,2] && enemy,stateno !=guardstate) ...these attack state, will send the enemy to a custom state.


But there is still an issue, the hitdef also makes damage when the enemy is in a guardstate....and using customstates, doesnt resolve these issue.....and the enemynear, variable also resolve these part.
SimplePortal 2.3.5 © 2008-2012, SimplePortal