I use HELPER for advice on how to use afterimage

Started by kindpot, March 20, 2024, 11:14:20 PM

Previous topic - Next topic

kindpot

[statedef 750]
type = S
physics = N
movetype = I
anim = ifelse((var(59) <= 0 && command = "holdback")||(var(59) >= 1 && random < 500), 751, 750)
velset = 0,0
ctrl = 0
sprpriority = -1

[state 750, vel]
type = velset
trigger1 = animelem = 3
x = ifelse(anim = 751, -8.5, 8.5)

[State 750, poweradd]
type = Poweradd
trigger1 = prevstateno = 150 || prevstateno = 151
trigger1 = AnimElem = 1
value = -1000

[State 750, envcolor]
type = EnvColor
trigger1 = prevstateno = 150 || prevstateno = 151
trigger1 = AnimElem = 1
value = 240,240,240
time = 3

[state 810, afterimage]
type = afterimage
trigger1 = animelem = 1
time = 9999
framegap = 3
length = 9
palbright = 1,1,1
palcontrast = 128, 128, 128
paladd = 0,0,0
palmul = .5,.5,.5
trans = add1

[state 810, afterimage remover]
type = afterimagetime
trigger1 = !animtime
time = 0

[state 750, vel]
type = velmul
trigger1 = animelemtime(4)>0
x = .85

[state 750, push]
type = playerpush
trigger1 = 1
value = 0

[state 750, nhb]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1

[state 750, end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1)


The code above is a normal rolling motion with afterimage.

My original goal was to appear multiple afterimages that followed the movement of the main body and to make the position of each afterimages a distance from the main body.

So I initially tried adding multiple afterimages to the script above, but only one afterimage was called per character's animation call.

With my beginner knowledge, I have a gut feeling that I need HELPER to implement what I want, but I am not sure.

I am very curious. Is it right to use HELPER to achieve the goal I want? If it is wrong, what code writing method should I follow to achieve the goal I want in the mugen engine?

I would really appreciate it if you could give me a proper guideline.

Thank you for reading my post

Odb718

Don't forget about Mugen Class. You can look up stuff to see if you're missing something.
https://mugenguild.com/forum/topics/afterimage-sctrls-169347.0.html
It sounds like your frame gap might want to be set to 1 or 0?
framegap = value (int)
        Every value'th frame in the history buffer will be displayed as an afterimage. For instance, if framegap = 4 (the default), then the first, fifth, ninth, ... frames of the history buffer will be displayed as afterimages.

Some people do end up using helpers for specific effects for after images. But if you just want 1 color, you should be able to just use After Image and not need a helper.
vVv Gouken718 vVv SabreTooth718 vVv


kindpot

Quote from: Odb718 on March 21, 2024, 02:58:41 AM
Don't forget about Mugen Class. You can look up stuff to see if you're missing something.
https://mugenguild.com/forum/topics/afterimage-sctrls-169347.0.html
It sounds like your frame gap might want to be set to 1 or 0?
framegap = value (int)
        Every value'th frame in the history buffer will be displayed as an afterimage. For instance, if framegap = 4 (the default), then the first, fifth, ninth, ... frames of the history buffer will be displayed as afterimages.

Some people do end up using helpers for specific effects for after images. But if you just want 1 color, you should be able to just use After Image and not need a helper.

Oh! What I want is each independent afterimage. I want multiple afterimages with different colors and framegaps. Maybe it's right to use helper. I need some guidelines on this.

XGargoyle

Impossible. Every new afterimage controller will automatically overwrite the previous afterimage.
The only way to achieve what you want (different colored afterimages), is to create multiple helpers that replicate the character's animation, each one of the helpers must become also invisible and have their own afterimage enabled


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!