Poweradd Scaling to Basic Attacks

Started by BurningSoul, July 18, 2017, 03:39:09 PM

Previous topic - Next topic

BurningSoul

Basic attacks usually gives back power but I want to scale the amount of power given back,if the move is chained from an another  move.
What should I do? Any Suggestions?

Cyanide

Simplest method is to base it on hitcount, or increment a variable as you make contact

getpower = value/hitcount

That will give an error because hitcount is 0 on your first hit. But that's the jist of it. As the hitcount increases your power values will decrease per hit until they're really really tiny. Use hitcountpersist = 1 under the statedef bit to make sure it follows you between moves as you combo.

You can get more complicated with variables and if you want more control over it, absolutely go down that path, but the above is really really simple.


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.

altoiddealer

Quote from: Cyanide on July 20, 2017, 08:05:52 AM
That will give an error because hitcount is 0 on your first hit. But that's the jist of it. As the hitcount increases your power values will decrease per hit until they're really really tiny. Use hitcountpersist = 1 under the statedef bit to make sure it follows you between moves as you combo.
Or slap a Cond on it, like for example
getpower = Cond(hitcount,value/hitcount,value)


XGargoyle

Or just
getpower = value/(hitcount+1)


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

Odb718

aaaaand SOLVED.
XGargoyle wins this round.
mete122, using Cyanide/XGargoyle's method, you'll have to adjust how much power you want the stand alone hit to gain,
Then you'll want to decide how much of a drop it'll take.

You could also use a subtraction method, but it's probably not smart because you could run into negative numbers.
Remember X/2 = X*0.5 so you can work it that angle too.

I'm pretty sure you can also do
poweradd = (20/(hitcount+1))
and go right from the statedef if you want the poweradd to happen if it hits or misses.
vVv Gouken718 vVv SabreTooth718 vVv