• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Scripted Follow attack

AlexDC22

Well-known member
so i needed a script to achieve this since i couldnt get it working the normal way.
the problem was that is a freespecial with a follow... and in the past it was working ok without a script but looked wonky AF, and now since ive added
dust fall land jump, this specific attack needed jumpframe and landframe to display the dust land.. in the past the was no need for them.
first video show it it was in the past and second how it is now... issue am having is that in the past the air hits where slower as the character would hover in the air till they where done... now tho with the additiong of jumpframe i cant seem to do that, while all the hits land , theyre rather fast now and am not sure which i like more..old and slow and or new and fast... in any case i cant get the new way to slow down but at least it shows the dust land animation...
thought on how to fix and or should i bother as it still functions albeit faster?
thanks
OLD WAY
NEW WAY
character animation
Code:
######################################################################
## FreeSpecial 3 & Follow 2 Animation ##
########################################

anim freespecial3
        loop    0
        delay    5
        jumpframe 1
        landframe 9 land
        followanim 2
        followcond 4
        fastattack 1
        sound   data/sounds/makiairk.wav
offset    27 112
        attack 999 999 1 1 1 0 0 0 0 0
        move    5
        bbox    10 16 26 71
        frame    data/chars/maki/jump1.png
        attack 0 0 0 0 0 0 0 0 0 0
offset    30 127
        bbox    14 24 20 82
        frame    data/chars/maki/jump2.png
offset    33 126
        bbox    16 24 24 70
        frame    data/chars/maki/jump3.png
        bbox    0 0 0 0
offset    37 130
        frame    data/chars/maki/free21.png
offset    38 142
        frame    data/chars/maki/free22.png
offset    40 142
        frame    data/chars/maki/free23.png
offset    51 151
        move    0
@cmd followatk "ANI_FOLLOW2"
        attack  30 49 95 21 8
        frame    data/chars/maki/free24.png
@cmd followatk "ANI_FOLLOW2"
offset    56 139
        frame    data/chars/maki/free25.png
offset    51 129
        delay   -1000
        frame    data/chars/maki/free26.png
offset    49 132
        delay   5
        attack  0 0 0 0 0
        frame    data/chars/maki/free27.png

anim follow2
        delay    5
        bbox    0 0 0 0
        landframe 13 land
        fastattack 1
        energycost 12
        sound   data/sounds/makispec.wav
offset    41 138
        frame    data/chars/maki/free28.png
offset    34 134
        attack  17 27 61 67 5
        frame    data/chars/maki/free29.png
offset    29 146
        frame    data/chars/maki/free30.png
offset    29 147
        attack  0 0 0 0 0
        frame    data/chars/maki/free31.png
offset    35 139
        frame    data/chars/maki/free32.png
offset    35 135
        frame    data/chars/maki/ver1.png
offset    35 142
        attack  21 6 52 102 5
        frame    data/chars/maki/ver2.png
offset    33 146
        frame    data/chars/maki/ver3.png
offset    33 148
        attack  0 0 0 0 0
        frame    data/chars/maki/ver4.png
offset    33 146
        frame    data/chars/maki/ver5.png
offset    34 151
        frame    data/chars/maki/ver6.png
offset    43 152
        frame    data/chars/maki/free33.png
offset    42 155
        delay   -1000
        frame    data/chars/maki/free34.png
offset    33 160
        delay   5
        frame    data/chars/maki/free35.png
offset    28 141
        delay   5
        attack  8 38 85 63 10 1
        frame    data/chars/maki/free36.png
offset    24 144
        attack  0 0 0 0 0 0
        frame    data/chars/maki/free37.png
Script for it... i import it to player.c script which every player uses
C:
// Define the follow attack function
void followatk(char next_anim)
{
    // Get the current entity
    void self = getlocalvar("self");

    // Get the number of hits the current animation has registered
    int hits = getentityproperty(self, "animhits");

    // If there has been at least one hit, switch to the next animation
    if (hits >= 1)
    {
        performattack(self, openborconstant(next_anim), 1);
    }
}
void main()
{
    // Set the current entity
    void self = getlocalvar("self");

    // Example condition to trigger the follow attack
    if (getentityproperty(self, "animationid") == openborconstant("ANI_FREESPECIAL3"))
    {
        // Call followatk with the desired animation name
        followatk("ANI_FOLLOW2");
    }
}
 
I think what you need is script to make Maki floats in mid air when she performs FOLLOW2. She floats until she ends her animation.
I suggest using floating script cause if she is hit before animation ends, the floating will end immediately.
 
I think what you need is script to make Maki floats in mid air when she performs FOLLOW2. She floats until she ends her animation.
I suggest using floating script cause if she is hit before animation ends, the floating will end immediately.
this took me a while..still learning and or getting used to scripting... will look into it thank you
also... didnt know that could be possible...but then again with scripts everything seems to be possible lol
 
Ahhh! I forgot about the floating script.

C:
void floater( int Time )
{// Floats in Time centiseconds
    void self = getlocalvar("self");
    int eTime = openborvariant("elapsed_time");

    changeentityproperty(self, "tosstime", eTime + Time*2);
}

Examples:
Code:
anim    follow31 #Screen jump when behind screen
    delay    8
    offset    290 293
    @cmd    stop
    @cmd floater 1000
    frame    data/chars/chun-li/walljump01.png
    delay 4
    frame    data/chars/chun-li/walljump02.png
    sound data/sounds/jump.wav
    frame    data/chars/chun-li/walljump02.png
    @cmd attack0 "ANI_FOLLOW28"
    frame    data/chars/chun-li/walljump02.png

Code:
anim    attack5 #Head drill
    offset    338 291
    @cmd floater 1200
    @cmd    leaper 2 -0.1 0 #leaper x y z
    loop    1 0 4
    landframe    4
    delay 16
    frame    data/chars/dhalsim/cvs2_dhalsim_546.png # 0
    @cmd    leaper 2 -0.1 0
    frame    data/chars/dhalsim/cvs2_dhalsim_547.png # 1
    @cmd    leaper 2 -0.1 0
    frame    data/chars/dhalsim/cvs2_dhalsim_548.png # 2
    @cmd    leaper 2 -0.1 0
    frame    data/chars/dhalsim/cvs2_dhalsim_549.png # 3
    @cmd attack0 "ANI_JUMPLAND"
    frame    data/chars/dhalsim/cvs2_dhalsim_204.png # 4
 
Last edited:
Ahhh! I forgot about the floating script.

C:
void floater( int Time )
{// Floats in Time centiseconds
    void self = getlocalvar("self");
    int eTime = openborvariant("elapsed_time");

    changeentityproperty(self, "tosstime", eTime + Time*2);
}

Examples:
Code:
anim    follow31 #Screen jump when behind screen
    delay    8
    offset    290 293
    @cmd    stop
    @cmd floater 1000
    frame    data/chars/chun-li/walljump01.png
    delay 4
    frame    data/chars/chun-li/walljump02.png
    sound data/sounds/jump.wav
    frame    data/chars/chun-li/walljump02.png
    @cmd attack0 "ANI_FOLLOW28"
    frame    data/chars/chun-li/walljump02.png

Code:
anim    attack5 #Head drill
    offset    338 291
    @cmd floater 1200
    @cmd    leaper 2 -0.1 0 #leaper x y z
    loop    1 0 4
    landframe    4
    delay 16
    frame    data/chars/dhalsim/cvs2_dhalsim_546.png # 0
    @cmd    leaper 2 -0.1 0
    frame    data/chars/dhalsim/cvs2_dhalsim_547.png # 1
    @cmd    leaper 2 -0.1 0
    frame    data/chars/dhalsim/cvs2_dhalsim_548.png # 2
    @cmd    leaper 2 -0.1 0
    frame    data/chars/dhalsim/cvs2_dhalsim_549.png # 3
    @cmd attack0 "ANI_JUMPLAND"
    frame    data/chars/dhalsim/cvs2_dhalsim_204.png # 4
sorta works, keeps floating forward instead of staying in place lol
also is suing both scripts as without mine it wont play anim follow 2
 
removed the move parts of the freespecial3 and also added to the script but nothing changes.
C:
void floater(int Time)
{
    // Get the current entity
    void self = getlocalvar("self");
    int eTime = openborvariant("elapsed_time");

    // Set the toss time to float in the air
    changeentityproperty(self, "tosstime", eTime + Time * 2);

    // Get current position
    int xPos = getentityproperty(self, "x");
    int yPos = getentityproperty(self, "y");

    // Stop horizontal and vertical movement
    changeentityproperty(self, "movex", 0);
    changeentityproperty(self, "movez", 0);
    changeentityproperty(self, "velocity", 0);

    // Ensure the player remains at the same position
    changeentityproperty(self, "x", xPos);
    changeentityproperty(self, "y", yPos);
}
 
Last edited:
// Optionally disable gravity changeentityproperty(self, "subject_to_gravity", 0);
you don't need to disable gravity - and it isn't a good thing to do because it will bite your ass later if you forgot to turn it on again.
The floater function already does that and as @DCurrent , it's a set and forget thing, way easier to handle.
 
you don't need to disable gravity - and it isn't a good thing to do because it will bite your ass later if you forgot to turn it on again.
The floater function already does that and as @DCurrent , it's a set and forget thing, way easier to handle.
thanks for the tip and noted and removed...still cant get it to stop floating away... tho if i give it a value of 20 it makes it somewhat better, but am not satisfied lol
i mean is ok, but am very unsure from old to new video and now this one lol
 
Last edited:
I think you need to find the right timing when she starts to float and when she stops after. Time how long the floating will run until it stops. Maybe like floater 50. Also, maybe floater 0 could stop floating? Try to figure out how long it runs before it stops.
 
I think you need to find the right timing when she starts to float and when she stops after. Time how long the floating will run until it stops. Maybe like floater 50. Also, maybe floater 0 could stop floating? Try to figure out how long it runs before it stops.
no the amount of time you put on it makes no difference at all... even -100 doesnt do anything as far as traveling goes.
the more time the longer it stays floating, but the traveling is the issue.. have to stop it from traveling and so far i havent been able to...
this is probably easy for the scripting gods, but am in the basement tier still lol
 
Last edited:
looking at this all wrong.. nothing to do with the script.. is the jumpframe settings thats causing the issue.. almost fixed have to the correct settings combined with move on the fames... so is pretty much fixed... will post in a bit a video of how it looks
 
so this is it so far... doesnt look as smooth as it does with speedx, but that is what keeps it moving forward.
unless anyone can make it smoother this might be it :/
also that floater script @maxman posted is perfectly fine and thank you.
C-like:
anim freespecial3
        loop    0
        delay    5
        jumpframe 1 2
        landframe 6 land
        followanim 2
        followcond 4
        fastattack 1
        sound   data/sounds/makiairk.wav
move 15
        attack 999 999 1 1 1 0 0 0 0 0
        bbox    0 0 0 0
offset    37 130
        frame    data/chars/maki/free21.png
        attack 0 0 0 0 0 0 0 0 0 0
offset    38 142
        frame    data/chars/maki/free22.png
offset    40 142
        frame    data/chars/maki/free23.png
offset    51 151
move 0
@cmd followatk "ANI_FOLLOW2"
        attack  30 49 95 21 8
        frame    data/chars/maki/free24.png
@cmd followatk "ANI_FOLLOW2"
offset    56 139
        frame    data/chars/maki/free25.png
offset    51 129
        delay   -1000
        frame    data/chars/maki/free26.png
offset    49 132
        delay   5
        attack  0 0 0 0 0
        frame    data/chars/maki/free27.png

anim follow2
@cmd floater 50
        delay    5
        bbox    0 0 0 0
        landframe 13 land
        fastattack 1
        energycost 12
        sound   data/sounds/makispec.wav
offset    41 138
        frame    data/chars/maki/free28.png
offset    34 134
        attack  17 27 61 67 5
        frame    data/chars/maki/free29.png
offset    29 146
        frame    data/chars/maki/free30.png
offset    29 147
        attack  0 0 0 0 0
        frame    data/chars/maki/free31.png
offset    35 139
        frame    data/chars/maki/free32.png
offset    35 135
        frame    data/chars/maki/ver1.png
offset    35 142
        attack  21 6 52 102 5
        frame    data/chars/maki/ver2.png
offset    33 146
        frame    data/chars/maki/ver3.png
offset    33 148
        attack  0 0 0 0 0
        frame    data/chars/maki/ver4.png
offset    33 146
        frame    data/chars/maki/ver5.png
offset    34 151
        frame    data/chars/maki/ver6.png
offset    43 152
        frame    data/chars/maki/free33.png
offset    42 155
        delay   -1000
        frame    data/chars/maki/free34.png
offset    33 160
        delay   4
        frame    data/chars/maki/free35.png
offset    28 141
        attack  8 38 85 63 10 1
        frame    data/chars/maki/free36.png
offset    24 144
        attack  0 0 0 0 0 0
        frame    data/chars/maki/free37.png
 
You missed some parameters for this, especially moving in X speed.
jumpframe {frame} {speedy} {speedx} {speedz} {dust}

  • If this command is present, the entity will perform a jump once frame {frame} is reached.
  • {speedy} is jumping velocity, {speedx} is x axis velocity and {speedz} is z axis velocity. Positive {speedy} value moves entity up, positive {speedx} moves entity front while positive {speedz} moves entity down in z axis. Negative value works the opposite.
  • {dust} defines which dust entity this entity will drop when entity jumps. See 'dust' command above for more info about dust entity.
  • For reference, the speed is x1pixel/centisecond for all 3 speed. For instance, if speedx is set to 2, entity will move 2 pixels/centisecond forward.
  • Despite its name, this command can be used to make entity moves straight instead of jumping by setting {speedy} to 0. It can also be used to make entity dives by setting negative {speedy}.
  • With {speedy} set to 0 and {speedx}/{speedz} set, entity will stop automatically at the end of animation.
  • Only one jumpframe command counts. Entity can't jump more than once in an animation by putting more in, even if the entity lands before the next jump starts. To set double or more jumps within same animations, script is required.
  • Now this command gives same effect to all entities. However there are default setting left behind for backwards compatibility. If {speedx} and {speedz} are not provided this is how the jump would be:
    • SpeedY is 0:
      • Player: The jump is very low, but the character moves forward.
      • Enemy: The jump is high and vertical.
    • SpeedY > 0:
      • Player: The jump is {speedy} high, and vertical.
      • Enemy: The jump is {speedy} high, and moves forward.
  • If you don't want that effect, simply give the desired value for {speedx} or just 0.
  • Setting 'jumpframe' in any FALL animation will change the respective falling arc. Useful to make launchers and custom throws.

If that doesn't work, why not use leaper instead?

Example:
Code:
anim    freespecial14 #Shoryuken
    offset    336 292
    delay    8
    loop    1 8 10
    landframe    10
    #jumpframe    4 2 1 0
    sound data/chars/ken/kshoryu.wav
    bbox 318 233 48 61
    hitflash specflash
    hitfx data/sounds/common/beat2.wav
    frame    data/chars/ken/cvs2_ken_427.png
    bbox 328 214 46 77
    frame    data/chars/ken/cvs2_ken_428.png
    bbox 332 191 38 100
    attack18 351 205 31 38 7 1 0 0 0 0
    frame    data/chars/ken/cvs2_ken_429.png
    attack18 0
    delay 1
    frame    data/chars/ken/cvs2_ken_429.png
    delay 8
    @cmd leaper 1 2 0
    attack18 345 144 31 78 7 1 0 0 0 0
    bbox 332 173 31 111
    frame    data/chars/ken/cvs2_ken_430.png
    attack18 0
    bbox 329 173 35 111
    @cmd leaper 0 0 0
    frame    data/chars/ken/cvs2_ken_431.png
    bbox 327 173 35 111
    frame    data/chars/ken/cvs2_ken_432.png
    frame    data/chars/ken/cvs2_ken_433.png
    bbox 323 176 37 111
    frame    data/chars/ken/cvs2_ken_434.png
    frame    data/chars/ken/cvs2_ken_435.png
    frame    data/chars/ken/cvs2_ken_436.png
    bbox 323 192 37 103
    frame    data/chars/ken/cvs2_ken_437.png

Code:
anim follow32 #Screen jump 2 / Jump to the front of the edge of the screen
    delay    5
    offset    290 293
    loop 1 15 17
    landframe 17
    flipframe 0
    @cmd    stop
    @cmd floater 2500
    frame    data/chars/chun-li/walljump01.png
    frame    data/chars/chun-li/walljump02.png
    frame    data/chars/chun-li/walljump02.png
    sound data/sounds/jump.wav
    offset    336 293
    @cmd    leaper 1.5 4.3 0
    delay 4
    frame    data/chars/chun-li/cvs2_chunli_143.png
    frame    data/chars/chun-li/cvs2_chunli_144.png
    frame    data/chars/chun-li/cvs2_chunli_145.png
    frame    data/chars/chun-li/cvs2_chunli_146.png
    frame    data/chars/chun-li/cvs2_chunli_147.png
    frame    data/chars/chun-li/cvs2_chunli_148.png
    frame    data/chars/chun-li/cvs2_chunli_149.png
    frame    data/chars/chun-li/cvs2_chunli_150.png
    frame    data/chars/chun-li/cvs2_chunli_151.png
    frame    data/chars/chun-li/cvs2_chunli_152.png
    frame    data/chars/chun-li/cvs2_chunli_153.png
    frame    data/chars/chun-li/cvs2_chunli_154.png
    frame    data/chars/chun-li/cvs2_chunli_139.png
    frame    data/chars/chun-li/cvs2_chunli_140.png
    @cmd attack0 "ANI_JUMPLAND"
    frame    data/chars/chun-li/cvs2_chunli_141.png

C:
void leaper( float Vx, float Vy, float Vz )
{// Leap with desired speed!
    void self = getlocalvar("self");
    int dir = getentityproperty(self,"direction");

    if(dir==0){ // Facing left?
      Vx = -Vx ;
    }

    tossentity(self, Vy, Vx, Vz); //Leap!
}

Is Maki's offset point below her air kick?
 
You missed some parameters for this, especially moving in X speed.


If that doesn't work, why not use leaper instead?

Example:
Code:
anim    freespecial14 #Shoryuken
    offset    336 292
    delay    8
    loop    1 8 10
    landframe    10
    #jumpframe    4 2 1 0
    sound data/chars/ken/kshoryu.wav
    bbox 318 233 48 61
    hitflash specflash
    hitfx data/sounds/common/beat2.wav
    frame    data/chars/ken/cvs2_ken_427.png
    bbox 328 214 46 77
    frame    data/chars/ken/cvs2_ken_428.png
    bbox 332 191 38 100
    attack18 351 205 31 38 7 1 0 0 0 0
    frame    data/chars/ken/cvs2_ken_429.png
    attack18 0
    delay 1
    frame    data/chars/ken/cvs2_ken_429.png
    delay 8
    @cmd leaper 1 2 0
    attack18 345 144 31 78 7 1 0 0 0 0
    bbox 332 173 31 111
    frame    data/chars/ken/cvs2_ken_430.png
    attack18 0
    bbox 329 173 35 111
    @cmd leaper 0 0 0
    frame    data/chars/ken/cvs2_ken_431.png
    bbox 327 173 35 111
    frame    data/chars/ken/cvs2_ken_432.png
    frame    data/chars/ken/cvs2_ken_433.png
    bbox 323 176 37 111
    frame    data/chars/ken/cvs2_ken_434.png
    frame    data/chars/ken/cvs2_ken_435.png
    frame    data/chars/ken/cvs2_ken_436.png
    bbox 323 192 37 103
    frame    data/chars/ken/cvs2_ken_437.png

Code:
anim follow32 #Screen jump 2 / Jump to the front of the edge of the screen
    delay    5
    offset    290 293
    loop 1 15 17
    landframe 17
    flipframe 0
    @cmd    stop
    @cmd floater 2500
    frame    data/chars/chun-li/walljump01.png
    frame    data/chars/chun-li/walljump02.png
    frame    data/chars/chun-li/walljump02.png
    sound data/sounds/jump.wav
    offset    336 293
    @cmd    leaper 1.5 4.3 0
    delay 4
    frame    data/chars/chun-li/cvs2_chunli_143.png
    frame    data/chars/chun-li/cvs2_chunli_144.png
    frame    data/chars/chun-li/cvs2_chunli_145.png
    frame    data/chars/chun-li/cvs2_chunli_146.png
    frame    data/chars/chun-li/cvs2_chunli_147.png
    frame    data/chars/chun-li/cvs2_chunli_148.png
    frame    data/chars/chun-li/cvs2_chunli_149.png
    frame    data/chars/chun-li/cvs2_chunli_150.png
    frame    data/chars/chun-li/cvs2_chunli_151.png
    frame    data/chars/chun-li/cvs2_chunli_152.png
    frame    data/chars/chun-li/cvs2_chunli_153.png
    frame    data/chars/chun-li/cvs2_chunli_154.png
    frame    data/chars/chun-li/cvs2_chunli_139.png
    frame    data/chars/chun-li/cvs2_chunli_140.png
    @cmd attack0 "ANI_JUMPLAND"
    frame    data/chars/chun-li/cvs2_chunli_141.png

C:
void leaper( float Vx, float Vy, float Vz )
{// Leap with desired speed!
    void self = getlocalvar("self");
    int dir = getentityproperty(self,"direction");

    if(dir==0){ // Facing left?
      Vx = -Vx ;
    }

    tossentity(self, Vy, Vx, Vz); //Leap!
}

Is Maki's offset point below her air kick?
have to try leaper didnt know about it.. and yeah i know about the parameeters and thats what i said on last video....its actually working still the jump is a bit wonky imho.. will try leaper in a bit thanks.

EDIT: just tried.. cool script but no that would not work but thank you for trying :)
what the last video shows is what needs to be..just the initial jump am not satisfied with it... but will see :)
 
Last edited:
ok last post on this and thanks @maxman your 2 scripts floater and leaper combined did the trick.
now am able tos to use speedx for a better smoother jump kick animation and the desired follow animation look...
just set the leaper to cancel the speedx from jumpframe and floater afterwars to do its thing and it worked yay xD
Code:
anim follow2
@cmd leaper 0 0 0
@cmd floater 50

 
Hi there, thought I shared how I went about mid air attacks before scrapping juggles.
I prefer cancel over follow.
Follow is something I would use on a command attack that connects involving supers,specials and grabs since I get to mess it the properties of it.
A midair attack simply need to go into the next attack at the player's will. That's my take on it
 
Hi there, thought I shared how I went about mid air attacks before scrapping juggles.
I prefer cancel over follow.
Follow is something I would use on a command attack that connects involving supers,specials and grabs since I get to mess it the properties of it.
A midair attack simply need to go into the next attack at the player's will. That's my take on it
looks good...i thought about juggles but the characters are to big and to much on screen for my taste to use... yours looks good tho 💪
 
looks good...i thought about juggles but the characters are to big and to much on screen for my taste to use... yours looks good tho 💪
What you think of Ryu's mid air attacks where he does 2 punches,I used cancel. Juggle isn't something I'm fond of though, Tekken ruined it for me.
 
What you think of Ryu's mid air attacks where he does 2 punches,I used cancel. Juggle isn't something I'm fond of though, Tekken ruined it for me.
i think it fits perfect for a 2d plain field..not a fan of air juggles but eveybody got their own taste. tho the ending was the best part of the clip tho xD..looks good brother
 
the problem was that is a freespecial with a follow
Sorry man, my post is in relation to this.
I would recommend cancel over follow in this situation.
Example;
freespecial3
Jump
Jumpattack
Cancel 5 5 1 A freespecial3
The 2 mid air attacks Ryu does show it in play, the rest of the video is just there and shouldn't even be considered, should of made a snippet but if seems like you figured it out with Maki so I'll leave it at that.
 
Back
Top Bottom