top of page

- Character State Module Tutorial -
- Light Attacks -

    Welcome! In this section we will be making our State Modules and make  calls for them. They will be very simple Attack State Modules as most of the time there is nothing detailed going on with Light Punches and Kicks.

    Of course the big deal will working with a State Addon called "Attack Definition" which is the Addon that makes UF2D a Fighting Game Framework, and the biggest node-system in it.

    Before we start, I assume that you have checked all the previous tutorials, got an "MyOmen" Fighter going on already as almost all Tutorials will be related to him.

  • Video to the right is a demonstration of the State Modules we will be creating.
     

  • We will also be using Ken Masters as the other Fighter to mainly focus on one "MyOmen".

Preparation

  • Let's copy the "SM Template" and put it into our newly created Folder and rename it "MyOmen_BasicAttacks_SM". We are having a "My" in the name so we don't mix it with the one already present in Omen folder itself.

A1- Standing Light Punch

  • It's okay to just edit nodes that are already there, but for the sake of tutorial, we will do everything from the beginning.

  • Here we will be adding a Custom Event for beginning and name it "State 1100". It is strongly suggested to NOT use State IDs between 0-1000 and 5000-7000 as they are mostly used by the Main State Module that contains the base States for Characters.

  • Now let's add a New State Definition. Never forget; the value of "New State ID" MUST match with the Custom Event's name, which is "State 1100" in this case.

  • We will be keeping Character Stance Value "Standing" but change the value of State Type to "Attack" so that everything in the current game that is active knows that this Fighter is currently attacking and without this option Attack Definitions do not work.

  • While attack, we need to make sure that Omen loses complete control. So neither Movement or Action Input will be allowed to be entered.

  • We also should make sure that once this State is triggered, any previous Movement should be stopped.

  • For these, we will use 2 State Components; Control and Movement Adjustments.

  • For Animation, we will be using a Flipbook that we will be making soon. First, we will need the Update Animation State Component.

 

  • The Extension we will use shall be "Unique" so that we can use any animation we need for this State.

  • In this node, tag "Unique" means we are allowed to have a Flipbook different than what UF2D provides as "Standard".
     

  • Tag "Main" means we are requesting an animation change on Character's main Flipbook(s). A Character's own flipbook is considered "Main" while Shadow and Reflection ones are considered "Fake". If you drag from "New Shadow Animation" for ex, you will see the Extension's name change to "Unique Fake".

i1.PNG
  • "Primary 0" input is for selecting a Flipbook. Currently Characters don't support more than one sprite, so there is only "Primary" option. Later on there will be "Secondary" slots for additional sprites. But for Omen, one is more than enough so let's start preparing an animation!

A2- Creating an Animation

  • First import the image files. Make sure we don't forget applying Paper2D properties so images stay pixelated and that palette system works.
     

  • Then we make sprites out of them, relocate and change the pivot positions so it is at the feet location!

  • Now let's handle the collision. First Sprite will only contain Box (Collision) and GuardBox (Lets Enemies trigger their Guard State) while second frame (where the actual attack occurs) will also include a HitBox (Allows Attack Landing) that our soon to be made Attack Definition can use!
     

  • PS: Copying First Sprite's Collision Data to second one just to save time. You can do it yourself too time to time!

  • Finally we will be making our Flipbook by selecting all the Sprites and [RMB] click on one of them to open up the menu to select "Create Flipbook".
     

  • Let's not forget to set "Frames Per Second" to 60 and also add another Sprite to recover from the Attack. Lastly we shall set the Collision value as "Per Frame Collision" as we need all the data from each sprite to make it all work properly!

  • Now that we have our Flipbook ready, let's put it in use by selecting it in our "Unique Animation Extension"!
     

  • Please note that we won't animations anymore in other tutorials and use the already made ones unless very necessary. 

A3- Moving on With State Module

  • Last Component we want to add is called Addon Entry Gate. (1) states that there is one gate which is the default entry point for adding Addons to our State.

  • For this State, the basic properties are finished. However we still need to have at least one State Addon to be able to get out of the Taunt state. So let's handle that next!

  • First let's add an "Addon - Play Sound - CD" to our Light Punch state to add a whiff sound.
     

  • Just like image files, sound files can be dragged into Folders as well. After importing change the value of "Sound to Play" to that new file. Other properties can stay as default for this particular sound.


     

  • We also used an "Information" node called "Animation Element". This node returns the current sprite that is being played in the animation of our Fighter.
     

  • In our case of Light Punch, we wanted the whiff sound to play when Omen punches forward. So we used an "Equal" node to check if the Element ID is "1" and then trigger the sound effect!

i2.PNG
  • "Primary" tag in "Animation Element" means we are checking for Fighter's Main Flipbook. "Free" tag is for more advanced situations.

A4- Input State Definition

  • Before we continue about implementing the Attack itself, it is better to check if our State Module is properly triggering or not.
     

  • Remember our Act System Bool Array? Please keep in mind the items that we will be using corresponding to the Attacks we will be doing. For Light Punch it is "Item 5" that we will be using!

i3.PNG
  • Next we will be adding the "State Change" Addon so once the animation is over, we will go back to Idle State.
     

  • For the sake of showing that copying code is safe, we will be getting the exact same State Change from our Taunt State Module!

  • Now that the State is ready to test, let's go back to MyOmen_Char and in Input System Graph duplicate the Input State Definition we have for Taunt.
     

  • It is definitely suggested to put each Input Definition in a Comment Selection too as it will eventually get crowded a lot!

  • You surely noticed that, in Blueprints the workflow is from left to right. Each node has inputs on the left side while outputs on the right. That's why the first Input Definition to be checked is at the farthest left. In this case, if Light Punch fails for some reason, Taunt will be checked.
     

  • Now you might be wondering; "Can't we have a system where nothing else is checked if "Taunt" is pressed?" but then Fighting Games can't be that simple. For now we are only pressing one button to change our Fighter's State, but what about combinations? As you can imagine the rabbit hole goes deeper the more complex you want your Fighter to be! Good news is that Input State Definitions are well optimized so it's alright to have a lot of them lined up!
     

  • It is also suggested to line up Input State Definitions depending on the length of the input combination, the longest ones being farther to the left. For example, if you have an Input State Definition with "Down + Forward + Punch" input combination, it is better to have one with "Forward + Punch" on its right. Note that (Forward + Punch) Part is shared in both inputs. If you put the second Input Definition with smaller configuration instead, the other one with longer input will not trigger or it will be complex to handle that. We will get to this example in "Omen's Hadouken" tutorial so don't worry about it for now!
     

  • Another suggest'on is lining up the Input State Definitions depending on their importance. That's why in the video above we put "Light Punch" definition on left side of "Taunt". 

  • Now let's get back to editing our new Input State Definition! Now we adjust it so that it triggers our so we set the "Target State Module" that as well. State 1100 in "MyOmen_BasicAttacks_SM"
     

  • We should change "Character Stance" check value to "Not Equal Air/Flying" as we want to be able to trigger this move if we are returning from any Crouching State.
     

  • Then the Act System Bool to "5" and we only need to press a single Action Input named "Light Punch".

  • Let's see if our State is now in the game! If you followed up till now, it should all work!
     

  • Of course no matter how hard Omen tries, there is no punching happening and our State is no different than the Taunt itself. So let's change it!

A5- Attack Definition

    "Attack Definition" Addon is the biggest one we will be ever working on. However despite its size, it is one of the easiest Addons to work on! So let's go through the inputs and outputs one by one!
 

​          ----------------------- Inputs -----------------------

  • "Unique Attack ID" sis an ID to use by other Attack Definitions most of the time by the inputs defined below. "Chain ID" allows this Attack Definition to be able to get chained by other ones. Opposite goes for the "No Chain ID" inputs. This allows us to decide whether an Attack can create a combo or not after an Attack with the defined ID landed before. Default values means every Attack can be chained to every other.
     

  • "Focus First Target" is mostly used if you want Attack to land on only one target such as grab attacks.
     

  • "Hit Priority" decides if this attack should land or not if the Target is also doing an attack. If Priorities of the attacks is same, than "Same Hit Priority Behavior" kicks in. "Hit" lets the attacks connect. "Dodge" and "Miss" are used by Throw Attacks to make them not land even in same priority situation. (System is WIP)

i4.PNG
  • "Hit Count" and "Delay Between Hits" defines how many times this Attack should do and with how many frame delays between them. 
     

  • "Attack Attributes" are tags for the Attack we are doing so aimed Targets will know how to react to it. Mostly used for Attack Immunities.
     
  • "HitBox Properties" are used so we can trigger Hit Boxes by using the data inside Sprites. "Trigger Condition" is the condition to trigger and "Box IDs to Use" is for if you want specific ones to be used.

  • "GuardBox Properties" are used so we can trigger Guard Boxes by using the data inside Sprites. "Guard Activator" allows you to either use actual Guard Boxes or a simple Distance Calculation (not working right now). "Trigger Condition" is the condition to trigger and "Box IDs to Use" is for if you want specific ones to be used. "Distance" is used if Guard Activator value is "Simple Distance.
     

  • "Team Affect List" lets us decide who this Attack Definition can land the attack on.
     

  • "Land Flag Lists" decides if an Attack can land on a Fighter or not depending their "Character Stance".
     

  • "Guard Flag List" does the same thing above but decides whether this Attack can be guarded or not in those Stances!
     

  • "Juggle States / Points" checks if the Target's current "Jump State / Point" is between those ranges.
     

  • "Juggle Timer" checks if the Target's spend time on juggle state is higher than the limit specified by the Juggle System Component.
     

  • "Extra Condition" is used if an extra reason to Wiff Attack is needed when juggling the Target.

    PS: More information will be given about Juggle System later on. Also, -1 Value Disables Checks.

    ​   ----------------------- Outputs -----------------------

     

  • "Extension Entry" allows us to link one extensions that are special to Attack Definitions. "Attack Impact Data" is also linked to them to transfer data between nodes. We will get to this very soon!
     

  • "Attack Finished" is triggered after one frame passes and all the data this node finished processing. You could say this is just for finalizing and getting the outcome and used mostly to trigger events in more advanced stages.
     

  • "Contact" returns TRUE when the Attack lands on at least one target. "Success" returns TRUE if the Attack landed and target received the hit. "Guard" returns TRUE if the same Attack is guarded.

i5.PNG
i6.PNG
Capture.PNG
  • Now let's have an Attack Definition node spawned and make sure that the "Trigger Conditions" for both our Hurt Box and Guard box are set properly. In this case we need "Animation Element" with return value equal to "=1" and "<=1". "=1" will be used for Hit Boxes (1 = Second Sprite Key Frame) and "<=1" will be used for Guard Boxes (0 and 1 both contained Guard Boxes).
     

  • Also the rest of the inputs can have default values no problem. 
     

  • Let's get you out of comfort zone and use Unreal Engine shall we? Drag out from the "Attack Impact Data" and link the "Current Target to a "Print String" node. Then link "Print String" to "Attack Finished" exec pin. Feel free to watch the video to the right to see how its done!

  • As we saw, Print String is giving us the value of "Ken_Char". This means Attack Definition is actually working!
     

  • However, Attack Definition Addon by itself is just there to catch a Target with given parameters and requests.
     

  • What we actually need from now on are called "Attack Extensions". So let's see what we can do with them!

i7.PNG

A6- Attack Extensions - Primary

    You see, Attack System is so big that it got its own extensions! So let's start and see what they are about!

  • "Impact Damage" is the first Extension we will be talking about. It is also strongly suggested to use it as the first Extension if this Attack is meant damage the Target.
     

  • "Damage Type ID" is there in case you want to have separate systems for different damage types such as Physical, Fire, Poison etc. Most fighting games only have one damage so having default ID is fine if you don't want to go extreme.
     

  • "Success/Guard Damages" are for when an attack lands on the target. "Fall Damage" is used when a Target is forced to fall down from an Attack and can't get its control back before landing on the ground.

i8.PNG
  • "Defense Penetration Percent" reduces the Defense of the Enemy towards that Damage Type. Value is percent based. For ex, a value of 50% will make this Attack ignore Target's armor by half.
     

  • "Damage KO" inputs define whether an Attack should cause a KO in those circumstances. For ex, you may want a Super to KO a target at the last hit or you want chip damage from guarding not cause a KO.

  • Now let's use the Extension above and give it some values, keeping it simple as possible.
     

  • Keep this in mind always; Extensions as they NEED to get the data from not only the Attack Definition but also from other Extensions too. That's why connecting "Attack Impact Data" links to each other is a must.
     

  • We prepared the Damage but still need to move on with further Extensions!

  • "Impact Movements" is the second Extension we will be talking about. It is strongly suggested to use it as a follow up to "Impact Damage" Extension.
     

  • This Extension is used as a Hub Node for another node type that is called "Attack Segment - Movement Data" which will contain the information on how a Target should change its location after the Attack lands.
     

  • Each input is related to a Character Stance whether the attack result was successful or not (guarded).

i9.PNG
  • Now let's use the Extension above and give it some values, it is as easy as just calling its name.
     

  • Let's NOT forget to connect "Attack Impact Data" connection for it is very important for all Extensions to work properly.
     

  • Next, let's talk about "Attack Segment - Movement Data".

​     --------------- X Impact Properties ---------------

  • "Direction" defines the type of way Target should move X axis wise.
     

  • "X Velocity" is the speed of X movement. Can not be negative. (Direction input defines the direction.)
     

  • "Slide Type" changes the curve of how smooth the movement will. This is basically what Ground Friction is and disabled when the Target is in air.
     

  • "X Slide Time" defines how long the ground friction will last in frames. Target will have max velocity at the first frame and slow down to zero value when as much as frame passed as Slide Time.
     

  • "Slide Strength" is a simple multiplier for Ground Friction.

i10.PNG

​    --------------- Z Impact Properties ---------------

  • "Z Velocity" is the speed of Z movement. Unlike X Velocity, this value CAN be negative!
     

  • "Gravity Type" changes the curve of gravity that eventually pulls the Target towards the ground if the Z Velocity is a positive value.
     

  • "Gravity Slide Time" defines how long in frames a Target can resist the gravity's pull if "Z Velocity" is positive. Target will have max Z velocity at the first frame and eventually lose the fight against the gravity, which its time is stated with "Gravity Slide Time" and will star to fall down. This value is disabled if "Z Velocity" is negative as Target will be falling down towards the ground and it is not fighting against gravity.
     

  • "Gravity Strength" is a simple multiplier for Gravity's pull force.
     

  • "Max Gravity Fall Value" is a limiter for Gravity's force so it doesn't go towards ridiculous values.
     

  • "Fall If On Ground" is a toggle that states if the Target was on ground when the Attack Hit, it should either make him use control or not. "Fall If In Air" does the same thing if the Target was in air.
     

  • "Laydown Time" is the time in frames of how long the Target will stay in "Laying Down" state after falling from the Attack if above Booleans are TRUE.
     

  • "Bounce Amount" defines how many times the Target should bounce before truly getting to "Lay Down" state.

  • Now it's time to use this "Attack Segment" node and give it some reasonable numbers. Note that you can link it one Segment node to many inputs in the "Impact Movement" node!
     

  • As you watch the video, one thing you shall note is that, we are making sure "Z Velocity" is 0 for Ground Impacts. So the Target does not go upwards from a Light Punch!

    At this stage, even if you want to test things out, Target will not move due to the impact. Because a Fighter only can be moved from an Attack if it is in a "Receive Hit" State. This will be handled by the next Attack Extension we will be talking about!

  • Here we have another large Extension named "Impact Attributes"! It is strongly suggested to be used as the last main Extension as it does NOT accept any other Extension previously mentioned. It got its own Extensions named "Impact Effect 2D" and "Impact Sound" which we will talk about soon.

    ----------------------- Inputs -----------------------

     

  • "Aim Ground/Air" is for telling Target what we are aiming this Attack for so the Receive Hit state can be selected accordingly. This is the first parameter to decide this.
     

  • "Animation Ground/Air" is the second parameter to change the State. Both this and above values decide the State to get changed. Feel free to experiment on them to find your own Impact State!

    ---- Pause Properties / SELF ----

     

  • "Pause Amount Success/Guard" determines how many frames the ATTACKER will be paused in place as both animation and movement wise.
     

  • "Delay Animation Freeze / Freeze Frame" is used for at which sprite the freeze will happen for ANIMATION. This is mostly useful for weapon swing attacks.

    ---- Pause Properties / TARGET ----

     

  • "Pause Amount Success/Guard" determines how many frames the TARGET will be paused in place as both animation and movement wise.
     

  • "Shake Amount Success/Guard" determines how many frames the TARGET will shake/twitch in place as it is paused. This amount can't exceed "Pause Amount" mentioned above.


    ---- Hit Times ----

i11.PNG
i12.PNG
  • "Ground Success/Guard" defines how long in frames the Target will stay in Receive Hit State on ground. This timer starts after "Pause Amount" is finished.
     

  • "Air Success/Guard" defines how long in frames the Target will stay in Receive Hit State in air. This timer starts after "Pause Amount" is finished.

    ---- Combo Parameters ----

     

  • "Combo Count" defines how many Combo Points the Attacker should get whenever this Attack Definition lands a successful hit.

    ---- Sprite Properties ----

     

  • "Sprite Priority" decides whether the Attacker Sprite should render in front of the Target or not. May be toggled off by "No Changes" option.

    ---- Facing Adjustment ----

     

  • "Self / Target" decides what kind of facing related to each other should do, if desired. Facing will trigger at the same frame the attack lands. Mostly used by grab attacks.

    ---- Force State Change ----

     

  • These Booleans force the Target to a Character Stance when hit.

      ----------------------- Outputs -----------------------
 

  • "After Character Impact" triggers as a ForEachLoop, meaning that this execution link will trigger as many as Characters got hit during that frame.
     

  • "Attack Result" Extension Entries trigger depending on if the Attack is Successful or Guarded. They are also linked to a ForEachLoop, meaning that these will trigger as many as Fighters have connected to the Attack Definition this Extension is linked to.
     

  • For example if we want to trigger an Effect 2D (or multiple) when attack landed successfully, we use the "Additional Extension Entry" of "Successful" tab.

i13.PNG
  • Now it's time to give some numbers to see if it's properly working or not. You will see that the Fighter is finally reacting properly!
     

  • I have given reasonable values for a Light Punch but feel free to explore the system yourself!
     

  • Now let's put some effect and sound to the hit. Hang in there, it's almost finished!

A6- Attack Extensions - Secondary

  • "Attack Extension - Play Sound" is the first Secondary Extension we will talk about and it got only two parameters. A Sound to use and its multiplier!
     

  • Once again we are using the sound files all around because why not! Feel free to import your own sound files to test it out!
     

  • Now that we have sound on, the only thing left to do for now is adding Effects!

  • Here we have another large Extension named "Impact Effect 2D"! It is strongly suggested to be linked at "Attack Extension - Impact Attributes" as it got many outputs and works as a ForEachLoop, allowing those outputs to trigger more than once in the same frame which and lets us trigger Effects in larger numbers.

    ----------------------- Inputs -----------------------

     

  • "ID" is used to be able to reach out this Effect by various means.
     

  • "Flipbook" is to select the animation, "Material" is for selecting the material or a palette.
     

  • "Render Position" defines whether we want it to be behind or in front of important Actors.
     

  • "Render Priority" is used to whether we want to render the effect behind or in front of other Effects that have same "Render Position" value.
     

  • "Force Unlit Mode" allows the rendered Flipbook to not get effected by the lighting sources currently present.
     

  • "Cast Shadow/Reflections" decides if such Flipbooks should be rendered on ground level.

    ---- Transform Properties ----

     

  • "Override Location" variables are used if we want to have a special location other than the Hurt Box's connection to the Target.

i14.PNG
  • "World Scale" is for to everyone's surprise, about the scale of the Flipbook. Crazy right?
     

  • "Delta Rotation" is if we want to add some extra rotation to the sprite. Useful to give a random feeling to the Flipbook if linked to a "Random Rotation in range" etc.

    ---- Attachment Properties ----
     

  • All these properties are used if you want the Effect tp get attached to a target with various means that Unreal Engine provides. Suggested to be left empty by default.
     

  • ---- Remove Parameters ----
     

  • "Remove Time in Frames" lets us having a timer for Effect to deleted. If left at "-1" it will be deleted when the Animation of Flipbook is over.

  • Now it's time to give some numbers to our Effect 2D Extensions, both for Attack being successful and guarded.
     

  • Again, feel free to fiddle the properties yourself to get your own results!
     

  • Now that we got some effects going on, lets add Sounds for each result of the Attack. It is a peace of cake compared to other stuff we have done so lets get to it!

     This concludes our long journey of making an Attack. If you have managed to come this far, you are at a reasonable level and should feel more comfortable for other things to come!

     Now it is time to handle the Crouching and Aerial Light Punches!

B1- Crouching Light Punch

  • Before we rush towards the Crouching Light Punch State, it is suggested to fill in the "Crouching" animations in FAnim of our Omen.
     

  • Here I will be using the default Omen's animations. Feel free to check them out!

  • Lastly lets select all the Standing Light Punch code and press [C] to cover it all up in a Comment so that we know where to look at when we want to find it or distinguish it all from other code we will be making!

  • Now let's select everything that the Comment Section is containing and make a copy of it. Then place it somewhere cozy as we will be editing it.
     

  • You will notice that Unreal Engine will give warnings about "not being able to copy". This is because Custom Events (ones we have as named "State [Number]" has to be unique. We will handle it now.

  • Let's rename our Custom Event that got a Warning above and make it "State 1105".
     

  • We will also edit "State Definition" values that are "New State ID" to 1105 and also change Character Stance to "Crouching" as we are doing a move is a Crouch State.
     

  • Again, this is to make sure that our Omen reponds correct to events that occur in game, especially Attack Impacts.

  • Now that we have our State Definition ready, we can move on. We don't need to change Control and Movement Adjustments, they can stay as they are.
     

  • However we need to change our Animation to a Crouchling Light Punch one. This time (and from now on) we will be using other flipbooks already available. Feel free to search for "Omen CLP" and we will get it right away!

  • We will be keeping the "Play Sound" Addon as default as well since we want the Wiff sound to be played again at Animation Element value "1", as the attempt to land a hit occurs in that frame run!

  • However we will not be leaving the "State Change" Addon as it is. We will be changing the "State to Call" value to 11.
     

  • Reason is "Idle Crouching State" is a global State that is "State 11". If we check the Fighter's Main State Module "Fighter_MainSM" we will see that "Idle Crouch" state is indeed State 11!

  • We will leaving "Attack Definition" mostly alone but there are some values that need to be changed.
     

  • Firstly we need to change "Attack Stance" to "Crouching". This value is used mostly by immunity checks so it is importantly to declare the correct value for it.
     

  • Secondly we should check if "Animation Element" values for Box Trigger Conditions are correct, which they are for now!

  • Last thing to change is a value in "Impact Attributes" are the "Aim" values. We want this Attack to aim for stomach as it makes more sense for a crouching attack to attack towards that section of a Fighter.
     

  • For this to occur we will select the value "Mid" for both "Ground" and "Air".

B2- Input State Definition

  • Now that the State is ready to test, let's go back to MyOmen_Char and in Input System Graph copy the Input State Definition we have for Standing Light Punch.
     

  • It is definitely suggested to put the new Input Definition in a Comment Selection!
     

  • We can also change "State to Trigger" value to 1105 while at it, as it is the State ID for our Crouching Light Punch State!

  • There is one more thing important to note about Crouching States.
     

  • In case we want to be able to trigger this move while we are not in a Crouching Stance but attempting to (pressing Down button), we might still want to be able to go into this State.
     

  • For this we need to use an "Information" node called "Pressing Down Button".
     

  • PS: This will be mosly important when comboing.

  • Let's see if our State is now in the game! If you followed up till now, it should all work!
     

  • You will witness that Ken also doing another Receive Hit Animation due to we changing the Aim to "Mid"!
     

  • This concludes our "Crouching Light Punch" journey for now. Onto the Aerial One!

C1- Aerial Light Punch

  • Before we continue, it is suggested to fill in the "Walking", "Turn Around" and "Jumping" animations in FAnim of our Omen.
     

  • Here I will be using the default Omen's animations. Feel free to check them out!

  • Lastly lets select all the Standing Light Punch code and copy paste it somewhere else.
     

  • After renaming the Comment Title, lets update the Custom Event's name to "State 1110" and update the State ID in the State Definition and also change Character Stance value to "In Air / Flying" as well!

  • Now that we have our State Definition ready, we can move on. We don't need to change Control Adjustment but we need to change Movement Adjustment!
     

  • We will set its values to "No Changes". But then the question arises; Why do we need it to be there then? The answer is we need tell UF2D that this Fighter is not simply Jumping anymore but changing State, so the "Ground Landing" result should be redefined!
     

  • We will do it with "Movement Extension - Z Contact SM Triggers"!
     

  • This Extension is used for updating "Z Axis Contacts". Z Axis Movement is mainly focused on touching Stage Ground and Stage Objects so proper landing States can trigger.
     

  • ZSO: Values for Stage Object Connection (Z Axis). SG: Values for Stage Ground. Almost all fighting games only focus on Stage Grounds, but Stage Objects that can be landed upon is supported by this Framework regardless of need.
     

  • Here we want to trigger "State 52" that resides in Main State Module that all Fighters have and 52 is just a "Landing after Jump" State ID.
     

  • PS (Post State Variable) is left empty as we don't need it.

i1.PNG
  • We also need to change our Animation to a Aerial Light Punch one for Update Animation Component. We will be using a flipbook that is already available. Feel free to search for "Omen ALP" and we will get it right away!
     

  • Also we will not be changing anything on Play Sound Addon as Animation Element value 1 is good enough for the wiff sound itself!

  • Next we will be deleting Change State Addon. Since this is a simple State where not even the movement changes, we are only changing the State when the Fighter Lands on the Ground, which we already defined by the Movement Extension above.
     

  • This removes the need of having a State Change Addon as we will eventually land on the ground.

  • Lastly we will not be changing Attack Definition as the values are good enough. We will only touch "Attack Stance" like we did for Crouching Attack and select "Aerial" this time.

C2- Input State Definition

  • Now that the State is ready to test, let's go back to MyOmen_Char and in Input System Graph copy the Input State Definition we have for Standing Light Punch.
     

  • It is definitely suggested to put the new Input Definition in a Comment Selection!
     

  • We can also change "State to Trigger" value to 1110 while at it, as it is the State ID for our Aerial Light Punch State!

  • There are two things to change. Firstly we need to change "Character Stance" check to "Equals to In Air / Flying" as we only want to trigger this State when in air.
     

  • Secondly we do not need "Movement Input Check" to be checked so we set its value "Irrelevant". The reason is in Jump State Movement Inputs are disabled so keeping the value "Enabled" would just never let this Attack Trigger.

  • Let's see if our State is now in the game! If you followed up till now, it should all work!
     

  • This concludes our "Aerial Light Punch" journey for now. Onto the Standing Light Kick!

D - Standing Light Kick

  • From now on our job will be much easier. We got all the possibilities for simple Punching States so we will use them for Kicks only fiddle with some values!
     

  • Now lets copy "Standing Light Punch" and change Comment name to "Kick" and change Custom Event's name to State 1200 along side with State ID value in "New State Definition - Standard" node!
     

  • PS: If you see me selecting and copying stuff, that means I am pressing [Ctrl + C] and then [Ctrl + V].

  • Movement and Control Adjustments can stay as they are but of course we need to change the Animation to "Omen_SLK_FB".
     

  • When we check it out the actual attempt to hit is in "Frame Run 2" so we will select value "=2" for Animation Element in Play Sound Addon for whiff sound.

  • Stage Change Addon can also stay same as we want to go back to Standing Idle State.
     

  • However Attack Definition need some adjustments. We shall change the Box Trigger value from "1" to "2". This is because attack frame run is at 2 while guard box containing sprites are 1 and 2.

  • Lastly since this is an Attack that is aimed at middle section of Enemy, lets change the "Aim" values to "Mid" that reside in "Impact Attributes" Extension.
     

  • Optionally we can also change the Impact Sound value to "Omen_LKHit" as well.

  • Now lets copy the Input State Definition of Standing Light Punch and convert it to Light Kick instead!
     

  • We are using value "8" for "Act System Bool List" and set "State to Trigger" to "1200" since it is the State ID this move belongs to.
     

  • Also lets change "Single Tap" value to "Light Kick".

  • Optionally leaving "Movement Input Check" with "Enabled" value might be problematic when we do combos as Omen won't be able to move during chain attacking.
     

  • So we can just set them all to "Irrelevant" and for the next upcoming attacks as well.

  • Let's see if our State is now in the game! If you followed up till now, it should all work!
     

  • This concludes our "Standing Light Kick" journey for now. Onto the Crouching Light Kick!

E - Crouching Light Kick

  • Lets do the same thing as before and copy "Crouching Light Punch" and change Comment name to "Kick" and change Custom Event's name to State 1205 along side with State ID value in "New State Definition - Standard" node!

  • Movement and Control Adjustments can stay as they are but of course we need to change the Animation to "Omen_CLK_FB".
     

  • When we check it out the actual attempt to hit is in "Frame Run 1" so we don't really change anything else related to Addons that trigger depending on the value. This goes for Attack Definition as well.

  • Lastly since this is an Attack that is aimed at lower section of Enemy, lets change the "Aim" values to "Low" that reside in "Impact Attributes" Extension.
     

  • Optionally we can also change the Impact Sound value to "Omen_LKHit" as well.

  • Now lets copy the Input State Definition of Crouching Light Punch and convert it to Light Kick instead!
     

  • We are using value "8" for "Act System Bool List" and set "State to Trigger" to "1205" since it is the State ID this move belongs to.
     

  • Also lets change "Single Tap" value to "Light Kick".

  • Let's see if our State is now in the game! If you followed up till now, it should all work!
     

  • This concludes our "Crouching Light Kick" journey for now. Onto the Aerial Light Kick!

F - Aerial Light Kick

  • Lets do the same thing as before and copy "Aerial Light Punch" and change Comment name to "Kick" and change Custom Event's name to State 1210 along side with State ID value in "New State Definition - Standard" node!

  • Movement and Control Adjustments can stay as they are but of course we need to change the Animation to "Omen_ALK_FB".
     

  • When we check it out the actual attempt to hit is in "Frame Run 2" so we will select value "=2" for Animation Element in Play Sound Addon for whiff sound.

  • Attack Definition need some adjustments as well. We shall change the Box Trigger value from "1" to "2". This is because attack frame run is at 2 while guard box containing sprites are 1 and 2.
     

  • Optionally we can also change the Impact Sound value to "Omen_LKHit" as well.

  • Now lets copy the Input State Definition of Aerial Light Punch and convert it to Light Kick instead!
     

  • We are using value "8" for "Act System Bool List" and set "State to Trigger" to "1210" since it is the State ID this move belongs to.
     

  • Also lets change "Single Tap" value to "Light Kick".

  • Let's see if our State is now in the game! If you followed up till now, it should all work!

    This concludes our long journey about Light Attacks! As you noticed it got only easier as we went on. Once you understand how Attack Definition works, it all becomes simpler in time!
 

     We will eventually start to use other properties it has but no other Tutorial or Documentation will be this long. If you survived through this, you got what it takes! Thanks for your time and reading! Feel free to go for "Medium and Heavy Attacks" Tutorial!

bottom of page