News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

DefenceMulSet

Started by BC, January 04, 2009, 09:18:28 PM

Previous topic - Next topic

BC

having a slight puzzled moment... coding mech mode for zangief... i want to make him recieve half damage when in the mode.

ive coded the super armour for him so thats set.

when he is in the mode i increased his attack damage using attackmulset... and returned it to normal when the var wasnt active that all works so i tried the same using defencemulset and its not working..


in the transformation state i added

[State 8000, Defence]
type = DefenceMulSet
trigger1 = (!Time)
value = 2.0  ;(in the docs it states float) 2.0 = takes half damage.

then in state -2

[State -2: Defence]
type = DefenceMulSet
trigger1 = (Var(42) <= 0) ;when the mode isnt active.
value = 1.0
ignorehitpause = 1


now this same method works for attackmulset so why not this?
Accepting commissions

Byakko

#1
In your last topic in the Dev Discussion section, I thought I already saw a (negative) "lifeadd" that would be based on dividing the damage received by two ? If you're still following that method, it's already there, it's the part that goes
[State 9000, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = - floor(gethitvar(damage) / 2)
in statedef 9000 (the override state). It's negative to make you lose life - half the normal received damage.

Otherwise, I think there were some problems with defencemulset, it has become too inconsistent in WinMugen, though I don't remember the details. That would most likely be the reason that method used a lifeadd instead.
edit - I'm told that " it only fires for any *additional* hit after the first, and works differently than the docs say". But "There is a work around though" and "If [you] sets Zangief's defense to the default for the mech, [you] can add a bit in the hitstates where damage is handled to add on the extra damage using the appropriate hitdef checks."
Furthermore, "The only issue beyond that is throws, but that could be handled with a var that tracks current life, checks to see if the character isn't in a regular hitstate but life has been depleted, and then do the appropriate additional life removal before setting the var to the current life value."
To note, the lifeadd method also doesn't work when Zangief is thrown, either, he'll get full damage when put in a custom state. Essentially, it's close enough if you're already following it.

As a very random note, the same person points out that "Zangief regularly takes 15% less damage" and "The mech mode adds another 5% to the damage reduction" ; plus "That seems consistent through all the Vs. titles he's in". Certainly, half the damage does seem to be a lot of reduction in that other method you were using.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

BC

ok yea im still using that method and i adjusted the value and it works great now thank you.
Accepting commissions

BC

#3
QuoteCertainly, half the damage does seem to be a lot of reduction in that other method you were using.

random note:  value = - floor(gethitvar(damage) / 2)

even though the minus was there to remove life, i had to remove the minus for that to work. it seemed to Add more damage when hit than normal.



also half damage reduction is alot, but the mode only lasts for 1200 gameticks so 20 seconds... but i guess increasing hit attack power kinda makes that a little unfair... in fairness though i wasnt looking to be accurate with the mode in terms of damage reduction and attack power increase.. mayb 25% reduction is better.

the info you gave was helpful although seemed a little complicated.. i guess reading and doing is different though. i can see i might have problems when he gets thrown then.

EDIT: this seemed to work better

value = Floor(gethitvar(damage)/4)   where medium kick usually dealt 60 damage, it now deals 45 in mech mode.
Accepting commissions

Rajaa Retired

yeah man it's simple math, you could have even multiplied it by a decimal/float value, it's all the same.

BC

rather than mutli post i thought id ask away here.

is there a way to override p2's get hit sounds?

like when hit in mech mode i want to play a metal clank noise instead of hear their noises they set.
Accepting commissions

Rajaa Retired

not without custom state, i think if you use a stopsnd with channel= -1 that stops p2 sound too, but yeah not without custom states.

BC

ah ok thanks, thats prob too much hassle i cant be bothered... just would sound crap if KFM hit him ya know? lol  :P
Accepting commissions