Question.

Started by Maistral, March 24, 2012, 09:00:43 PM

Previous topic - Next topic

Maistral

Hi, I'm back. Wanted to make new characters again, though my memory is quite.. should we say, rusty.

How do you change the velocity of a helper-type projectile with respect to distance to the target? IE. The farther the target is, the faster  it moves, but as it comes closer it slows down.


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks


Cyanide

You would use an expression that takes into account p2's current distance and divides it by a lot.

The simplest would be

velset
trigger1 = 1
x = p2dist X/20

At 100 pixels away the helper will be travelling at a vel of 5. At 20 pixels it'll be travelling at a vel of 1. Should work. May want to tweak it a lot.


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.

2OS

Same goes for Y but you might wanna give that offsetting.

y=(p2dist y-75)/20

The -75 is the offsetting and the parenthesis are important. IfElse or Boolean Math it if you want to accord it to statetypes. -75 is good for stand and air, -25 is good for crouch and liedown.

I've done a move like this before. The LEAST you're gonna wanna divide by is 100 ( in terms of fairness ). I use 20 for aura's, which is way too fast to be fair as a projectile.

Hence you may want to tweak it a lot.

Maistral

aight, got it. thanks.


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks