Damage decrease.

Started by chickiln, May 11, 2010, 06:50:28 PM

Previous topic - Next topic

chickiln

How do i make it so when you hit an opponent you hurt less and less? I'm trying to make characters less spamy with this. :P

Quote from: Average Mugen Guild Poster on October 23, 2010, 12:14:30 AM
I just noticed, that the kid in my avatar looks just like Titlin except with blonde hair. I'm not even joking.

Ricepigeon

#1
You mean a damage dampener?

AttackMulSet with value set to a variable. Have this variable set to 1.0 when you want the full damage and less than 1 but greater than 0 when you want the dampening to occur.

kakkoii superhero

put it in statedef-2 or -3

also you need to make a variable to count hits
and use the value of that variable as trigger of the dampener value

Cybaster

Damage Dampener by POTS :


;Damage Dampener Variable (by POTS)
[State -2, Damage based on hits]
type=varset
trigger1= numenemy
fvar(12)= ifelse(enemynear,gethitvar(hitcount)<3, 24, ifelse(enemynear,gethitvar(hitcount)>=24, 2, 26-enemynear,gethitvar(hitcount))) / 24.0  ;CFJ
;fvar(12)= ifelse(enemynear,gethitvar(hitcount)=0, 1, ifelse(enemynear,gethitvar(hitcount)=1, .9, .8**enemynear,gethitvar(hitcount)))  ;MVC
ignorehitpause=1

;Damage Dampener Variable Reset (by POTS)
[State -2, Reset var when the opponent recovers]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
trigger2= !numenemy
fvar(12)=1

;Damage Dampener
[State -2, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(12)
ignorehitpause=1

Cyanide

Really fast easy dampener i got from [E] that i don't know where he got it from

[state -2]
type = attackmulset
trigger1 = movetype = A
value = enemynear(0),gethitvar(hitcount) ** 0.9

Count's hit's exponential drop in regards to how many times you've been hit.

Takes up no space.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Cybaster

I think you rather meant 0.9**gethitvar(hitcount)

Cyanide

Possibly. Writing things at work when i can't double check my shit math isn't helpful.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Seravy

The only thing I want to add, if you have helpers that do damage, Attackmulset in the minus states doesn't apply to them...so if you want it to apply to those as well, you have to use attackmulset in your helper states too(and reference the variable as parent,fvar(x))

Ricepigeon

Quote from: Seravy on May 12, 2010, 12:53:44 PM
The only thing I want to add, if you have helpers that do damage, Attackmulset in the minus states doesn't apply to them...so if you want it to apply to those as well, you have to use attackmulset in your helper states too(and reference the variable as parent,fvar(x))

or simply have damage = ceil(yyy*root,fvar(xx))

Thats what I do.

Also if you want a proration system (where each individual attack affects the dampener rather than have it based on hits), then you'll need to add the following to each state:

[State xxx, dampen]
type = varset
trigger1 = movehit
persistent = 0
fv = yyy
value = fvar(yyy)*Z

where Z is a decimal between 0 and 1. For helpers, you would need to use parentvarset instead (if its a helper spawned by another helper then things become problematic as there is no RootVarSet sctrl). Iirc, Blazblue and the Touhou games use this system.

Cyanide

No rootvarset yet.

I've worked out that using a single invisible projectile will do for really quick stuff. They're owned by root so you can check the ID and use that as the value.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Bastard Mami

Quote from: Cyanide on May 12, 2010, 07:14:16 AM
Really fast easy dampener i got from [E] that i don't know where he got it from


sf3 faq.