Final Fight LNS Questions

Harmy

New member
excuse me.I am Chinese.
Can I ask the game:final fight lns.
I want to ask about how to random choose hero.
When I choose the mode,system auto random choose hero,and begin the game.
Or I choose the mode,system auto press a few random keys and press Enter.
Now,there is a key,it can random.But I have to press it,and press Enter.
Your game just press random,no press Enter,then the game begin.I like this.And I like your game very much.
How can i do this.
Thank you.
 
excuse me.I am Chinese.
Can I ask the game:final fight lns.
I want to ask about how to random choose hero.
When I choose the mode,system auto random choose hero,and begin the game.
Or I choose the mode,system auto press a few random keys and press Enter.
Now,there is a key,it can random.But I have to press it,and press Enter.
Your game just press random,no press Enter,then the game begin.I like this.And I like your game very much.
How can i do this.
Thank you.

As @danno said, we do not support LNS games here. So if you are trying to make something work within Final Fight LNS, you are on your own. However, if you are trying to replicate something you saw there in one of your own projects we can help.

DC
 
Hello all. I am new here. I'll try to explain what it is I am trying to do here to the best of my ability.


I have been following this guide from top to bottom:

Final Fight LNS uses OpenBOR 3.0. Just wanted to get that out of the way first.

Now, in this game, there are special moves. But they require commands such as

Code:
com  d f j          freespecial2
com  d u j          freespecial3
com  d f u j          freespecial3

You get the picture. My problem is, this doesn't work very well in actual practice. So I've gone into a character's file (ex: cammy.txt) and made some changes. The command I WANT is:

Code:
com  f a3          freespecial2

However, I'd like the command to be WHILE HOLDING forward. Does that make sense? So essentially, I'd like to do it at any time while holding down forward (running, walking) and then if I press Attack3, that particular special move comes out (in this case "freespecial2").

my plan is to assign a special to the attack3 button for each direction on the dpad.

Code:
com  f a3          freespecial2
com  d a3          freespecial3
com  u a3          freespecial4

Currently, if I try to do it as is, I will have to hit forward AND THEN attack3 to get the special to come out. I should ALSO note that I am NOT looking for :

Code:
com  f + a3          freespecial2
com  d + a3          freespecial3
com  u + a3          freespecial4


...as that causes MAJOR issues. Such as a near impossible execution of the special move.. (seriously, it's almost impossible to hit both buttons on the same frame for some reason. There is no leniency. And I dont see a way to control this?).

Any help or insight you all can provide would be most helpful. If this can even be done, that would be great. I am attaching my edited cammy.txt as well as the menu.txt which has the extra attack3, attack4 for reference. I realize I need to add some more cancels for supers, and other freespecial moves... but right now, freespecial2 should be completed input (COM) and cancel wise (cancel list entries). My focus is just trying to get the special commands to work while holding forward right now.

Thanks,

TOAO
 

Attachments

Post moved

Hello @theoneandonly and welcome to the forum, Final Fight LNS is not supported at Chrono Crash
Is there any documentation as to why this is?

Also, my question is more so related to openbor and how it handles inputs. I dont really care about LNS. That was more an example as to what I was trying to achieve.
 
The reason LNS is not supported is because they use an altered version of the OpenBor Engine so what we advise you on how inputs function won't work if you are using Final Fight LNS as an example.
 
I had the same struggle on the past and I solved this by using a cancel in the character walk animation
See that's the thing, I've applied cancels in the walk animation and... well it starts acting weird. It doesnt come out sometimes while walking/running.... I feel I must be doing something wrong. Do you happen to have a copy of one of your modded character's .txt's I could look at for an example? I just need to see it once.
 
See that's the thing, I've applied cancels in the walk animation and... well it starts acting weird. It doesnt come out sometimes while walking/running.... I feel I must be doing something wrong. Do you happen to have a copy of one of your modded character's .txt's I could look at for an example? I just need to see it once.

so you want like doing a running shoryuken or something like that?
 
so you want like doing a running shoryuken or something like that?
Sort of... What I am asking is:

I'd like the game to count me walking/running forward (HOLDing dpad forward) and then pressing my "special" button as described above to make a "shoryuken" come out using your example. I've looked over the openbor documentation and I don't see this capability. At least not in 3.0. Im starting to think this isn't possible without actual coding (even in openbor official as there isn't any documentation regarding this).

If you've ever played sor4. There are commands like that. You can already be holding down forward before hitting a special button and it will register as F + S (special). As it is now, you can only set one of two options in LNS (and I'm assuming openbor too): f, AND THEN special in a sequence or f+special simultaneously which the game input reads... Very awkwardly. It's very difficult to do to the point of hilarity.

I hope this makes sense.
 
I'd like the game to count me walking/running forward (HOLDing dpad forward) and then pressing my "special" button as described above to make a "shoryuken" come out using your example
@theoneandonly In case you use an official OpenBOR version, you can use the following script in the keyscript event:

Call the event in the character header using this way
keyscript data/scripts/keyscript.c

Then put the code below in the keyscript.c file, create it if you don't have one.
Code:
void main()
{//Execute an animation by holding a certain direction and pressing a defined key
    void self = getlocalvar("self");
    void animation = getentityproperty(self, "animationID");
    int pIndex = getlocalvar("player");
    int direction = getentityproperty(self, "direction");
    int pressSpecial = playerkeys(pIndex, 1, "special");
    int holdRight = (playerkeys(pIndex, 0, "moveright") && direction == 1);
    int holdLeft = (playerkeys(pIndex, 0, "moveleft") && direction == 0);

    //DETECT KEYS
    if(pressSpecial && (holdRight || holdLeft)){

        //LIST ALL ALLOWED ANIMATIONS
        if( animation == openborconstant("ANI_IDLE")||
            animation == openborconstant("ANI_WALK")||
            animation == openborconstant("ANI_RUN")){
            
            //RESET CHARACTER VELOCITY AND EXECUTE THE DESIRED ANIMATION
            changeentityproperty(self, "velocity", 0, 0, 0);
            performattack(self, openborconstant("ANI_FREESPECIAL"));
        }
    }
}
 
Isn't it something like this?

Code:
anim walk

    loop 1
    delay 6
    offset 50 100
    cancel 0 4 0 a2 freespecial8
    frame ....
    frame ....
    frame ....
    frame ....
    frame ....
 
Isn't it something like this?

Code:
anim walk

    loop 1
    delay 6
    offset 50 100
    cancel 0 4 0 a2 freespecial8
    frame ....
    frame ....
    frame ....
    frame ....
    frame ....
Yes and it doesn't works well all the time. On my case, I have two freespecials
A2
F+A2

Without using the cancel, the second one never triggers. Using the cancel on walk, it triggers, but not 100% of the time.
 
@theoneandonly In case you use an official OpenBOR version, you can use the following script in the keyscript event:

Call the event in the character header using this way


Then put the code below in the keyscript.c file, create it if you don't have one.
Code:
void main()
{//Execute an animation by holding a certain direction and pressing a defined key
    void self = getlocalvar("self");
    void animation = getentityproperty(self, "animationID");
    int pIndex = getlocalvar("player");
    int direction = getentityproperty(self, "direction");
    int pressSpecial = playerkeys(pIndex, 1, "special");
    int holdRight = (playerkeys(pIndex, 0, "moveright") && direction == 1);
    int holdLeft = (playerkeys(pIndex, 0, "moveleft") && direction == 0);

    //DETECT KEYS
    if(pressSpecial && (holdRight || holdLeft)){

        //LIST ALL ALLOWED ANIMATIONS
        if( animation == openborconstant("ANI_IDLE")||
            animation == openborconstant("ANI_WALK")||
            animation == openborconstant("ANI_RUN")){
           
            //RESET CHARACTER VELOCITY AND EXECUTE THE DESIRED ANIMATION
            changeentityproperty(self, "velocity", 0, 0, 0);
            performattack(self, openborconstant("ANI_FREESPECIAL"));
        }
    }
}
Thank you. And thanks everyone for helping
 
one big problem I find just like you do and I think it doesn't matter which version of OpenBOR you are using is the pressing of 2 buttons at the same time thing, you can't even miss a milisecond in order to make those kind of moves.
 
Then put the code below in the keyscript.c file, create it if you don't have one.
Hey buddy, I've tested this code and works like a charm.

The manual list those button names only:
  • key names:
    • "jump"
    • "attack"
    • "special"
    • "esc"
    • "start"
    • "moveleft"
    • "moveright"
    • "moveup"
    • "movedown"
    • "screenshot"
    • "anybutton"
But you can use the other buttons like "attack4", which is my case, and it works. Maybe I need to update the manual with this.

Btw, I've modified your code a bit by implementing a MP check (since the original code makes the entity to change to the FREESPECIAL without any check, even if the animation has a Energycost) and using a forwarder

C-like:
void actual_main()
{//Execute an animation by holding a certain direction and pressing a defined key
    // Thanks Kratus! - 2024.08.14
    void self = getlocalvar("self");
    void animation = getentityproperty(self, "animationID");
    int pIndex = getlocalvar("player");
    int direction = getentityproperty(self, "direction");
    int pressSpecial = playerkeys(pIndex, 1, "attack4");
    int holdRight = (playerkeys(pIndex, 0, "moveright") && direction == 1);
    int holdLeft = (playerkeys(pIndex, 0, "moveleft") && direction == 0);
    void MPower = getentityproperty(self,"mp"); //GET CALLER MP
    int minMP = 20; // MINIMUM MP TO EXECUTE THE MOVE

    //DETECT KEYS
    if(pressSpecial && (holdRight || holdLeft)){

        //LIST ALL ALLOWED ANIMATIONS
        if( animation == openborconstant("ANI_IDLE")||
            animation == openborconstant("ANI_WALK")||
            animation == openborconstant("ANI_RUN")){
           
            if (MPower >= minMP){ // CHECK MP VALUE
            //RESET CHARACTER VELOCITY AND EXECUTE THE DESIRED ANIMATION
            changeentityproperty(self, "velocity", 0, 0, 0); //STOP THE ENTITY
            changeentityproperty(self, "mp",MPower-minMP); //SUBSTRACT THE MINIMUM MP FROM THE ACTUAL MP VALUE
            performattack(self, openborconstant("ANI_FREESPECIAL2")); // ANIMATION TO EXECUTE
            }
        }
    }
}
 
Last edited:
Hey buddy, I've tested this code and works like a charm.
Great! Glad it works well, buddy :)

But you can use the other buttons like "attack4", which is my case, and it works. Maybe I need to update the manual with this.
Yeah, I looked at the manual right now and it really doesn't show the buttons "attack2/3/4". I agree with updating the manual, I've been using these buttons since the SOR2X and can confirm that they work fine.

Btw, I've modified your code a bit by implementing a MP check (since the original code makes the entity to change to the FREESPECIAL without any check, even if the animation has a Energycost) and using a forwarder
Good catch, I forgot to put back a mp check while cleaning the code. But I can confirm that this method will works fine, all my cancels that have hp/mp cost in the SORX are working this way.
 
Back
Top Bottom