Home Gallery Resources The Team Rules chat Login Register
Pages: [1]
Author Topic: How to make a 3 level charge (cancelable) attack in Brawlbox v0.68b  (Read 1453 times)
0 Members and 1 Guest are viewing this topic.
ThePhantomPsychic
Extreme Kitten
*******
Offline Offline

Posts: 328


You like Krabby Patties, don't you Squidward?

  • Awards Tutorial Writer

  • View Profile Awards
    « on: April 24, 2015, 10:23:41 PM »


    Probably some of you want to know what "cancelable" means. That means, when you push the "B" button during the attack, a weaker version fires off, like Samus's charge shot.

    What you'll need:
    Brawlbox v0.68b
    FitCharacter.pac
    This tutorial.
    An animation for charging.

    Note: Try not to use characters with low memory limits (some characters will freeze the game quicker than others, due to the size of the moveset file being too large. I chose Mario for this tutorial, but if the character you choose works, use them), because you will have a heck of a time using this tutorial if you don't have a "lenient" (in terms of file space) file.

    For the charge subaction, I decided to add some damage based heavy armor, but this is optional to you.

    Code:
    [optional]Super/Heavy armor: State = Damage based Heavy Armor; tolerance = 15[/optional]
    Asynchronous timer: frames = 4

    I chose 4 frames in the coding, because I thought that was when you should be able to roll out of it, but you can choose anything, but I recommend it being early in the animation.

    Now to add the coding that allows you to ACTUALLY roll out of the attack.
    Your coding should be this far after updating:
    Code:
    [optional]Super/Heavy armor: State = Damage based Heavy Armor; tolerance = 15[/optional]
    Float variable set: La-Float [101] = 2
    Asynchronous timer: frames = 4
    Change action:31 requirement = compare: IC-Basic [1011] >= IC-Basic [3149]
    Additional change action requirement = compare: IC-Basic [21001] < IC-Basic [23038]
    Additional change action requirement = on ground
    Change action:32 requirement = compare: IC-Basic [1012] >= IC-Basic [3149]
    Additional change action requirement = compare: IC-Basic [21001] < IC-Basic [23038]
    Additional change action requirement = on ground

    You may be wondering, why did he put a Float variable in there? To answer that, it's for controlling the amount of damage the attack does.

    Now, we need to update the variables in the subaction:

    Code:
    [optional]Super/Heavy armor: State = Damage based Heavy Armor; tolerance = 15[/optional]
    Float variable set: La-Float [101] = 2
    Asynchronous timer: frames = 4
    Change action:31 requirement = compare: IC-Basic [1011] >= IC-Basic [3149]
    Additional change action requirement = compare: IC-Basic [21001] < IC-Basic [23038]
    Additional change action requirement = on ground
    Change action:32 requirement = compare: IC-Basic [1012] >= IC-Basic [3149]
    Additional change action requirement = compare: IC-Basic [21001] < IC-Basic [23038]
    Additional change action requirement = on ground
    Asynchronous timer: Frames = 57
    Float variable add: LA-Float: [101] +=4
    Asynchronous timer: Frames = 114
    Float variable add: LA-Float: [101] +=4
    Asynchronous timer: Frames = 156
    Float variable add: LA-Float: [101] +=4
    Asynchronous timer: Frames = 179
    Bit variable set: La-Bit: [100]
    Super/Heavy Armor: State=0; Tolerance=0;

    You may wonder why I threw that bit in there, and it's to tell the game that the attack is finished.
    Go to the "Other" Tab in this subaction, and put this coding in:
    Code:
    Set loop: times = 179
                   if button press:1
                         change subaction (the one you want to use for attacking the opponent.)
                   end if
    Execute loop

    What this does is let your program push the "B" button and let it interrupt the current subaction.

    Now, go to the Actions tab that coordinates with this subaction.
    (274=Neutral Special, 275=Side special, 276=Up special, 277=Down Special.)
    Clear other coding and put this coding in:
    Code:
    If on ground:
        Change action = 14: requirement in air
        If bit is set: LA-Bit [100]
                Change Subaction (the attacking one)
        else
                Change Subaction (the charging one)
        end if
    else
        Change action = 0: requirement on ground
        If bit is set: LA-Bit [100]
                Change Subaction (the attacking one)
        else
                Change Subaction (the charging one)
        end if
    end if

    What this does is it tell the game "if the character is off the ground, change the action." or "If the character lands, change the subaction. It also asks if the game is done with the charge, by asking if the bit is set.

    Now, go to the attacking subaction, and put this coding in:
    Code:
    Bit variable clear: LA-Bit [100]
    Asynchronous timer: (however many frames until the attacking part)
    Special offensive collision: ...Damage = LA-Float [101]... <-(I told you we'd get to this.)
    Synchronous timer: (However many until the attacking part's over.
    Terminate collisions
    Float variable subtract: LA-Float [100] -= 12
    Asynchronous timer (1 frame before the ending frame of the animation)
    Allow interrupt

    Just a little bit more coding.

    In both the entry subactions, put:

    Code:

    Bit variable clear: LA-Bit [100]


    That should be all, PM me or post below if there are any problems.
    « Last Edit: November 06, 2016, 04:47:48 PM by ThePhantomPsychic » Logged


    Pages: [1]
    Print
    Jump to: