top of page

- Character State Module Tutorial -
- Hurricane Kick -

    Welcome! In this section we will be making our first State Module that contains Movement And Attack Definitions at the same time. It will be a basic State but for the first time we will also use "Post State Variable Lists" to change what a State Module can do before triggering it!

​

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

  • Video to the right is a demonstration on the State Module we will be creating. Basically Omen will be able to do an Attack called "Hurricane Kick" in Ryu's terms. However post state change variable will let us do different length duration of the State! 

​

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

 1- Preparation

  • Let's start with getting our Blueprint read. We will put a copy of "SM Template" and put it into our "Self_SMs" Folder and rename it "MyOmen_SpecialAttacks_SM". Let's clear all the Template State code in there as well.
     

  • We will doing more than one movement state eventually so it is better to do name it like this!

 2- Starter State Definition

  • 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 1800". 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. Our first State will contain a small hop for preparing the Main State that will do the Attack so we will be having both X and Z Movement Addons. For this reason it is okay to have a "In Air / Flying" Character Stance value.
     

  • Let's have State Type is "Attack" and we will be changing the New State ID from "0" to "1800".

  • At the start of the Hurricane Kick we need to make sure that Omen loses complete control. So we will using "Control Adjustment" Component.
     

  • Next we will be using "Update Animation" Component to trigger a Unique Animation that is named "Omen_HurKick0_FB".

 3- Addon - Add Movement and Addons

  • Now let's add a State Component named "Set X Movement" and a "Timeline" too and rename it something we prefer!
     

  • After linking "Update and Finished" inputs and outputs to each other, let's call for its Timeline Reference, the one that we just made.
     

  • Finally let's create a Float Track in the newly created Timeline with one key at Time 0 with value of 400 and link it to Movement Value of our Component.

  • Next let's add another State Component named "Set Z Movement" and a copy the "Timeline" we made previously and link its "Update and Finished" inputs and outputs to each other.
     

  • After renaming it let's call for its Timeline Reference, the one that we just made.
     

  • After that lets rename and edit the Float Track by editing the only key present. Let's change it's Time to 0 with value of 250 and link it to Movement Value of our Component.

  • With X Movement Component our Fighter will be constantly moving forward and with Z Movement it will constantly rise upwards.
     

  • However we want the Z Movement to eventually stop as a "Hop Finish". For that to happen let's add an Addon Gate and a State Change Addon right after it with State ID value "1805" and "Animation Over" Condition.
     

  • We will leave "Target State Module" value empty. This will cause this Addon to trigger a State within this State Module!

  • For this State let's do one last final touch and add a "Play Sound - IT". We will use this for playing a Ryu's Self Voice so it is okay to have it as "IT" tagged, aka instant Trigger.
     

  • Let's give it the "Sound to Play" value of "OmenHurrKick_Snd" and set the "Channel ID" value as "Voice" so that if Omen decides to do another voice. Also let's toggle "Remove on Get Hit" so that if Omen get's attacked, sound is stopped.

 4- Main Attacking State

  • We are done with the Starter State so let's go on with the Main one!
     

  • Now let's copy the State Definition 1800 we just made previously and set all the State ID values to 1805, including the Custom Event.
     

  • "Control Adjustment" will stay "Disabled" so nothing to change on it. However we will add a "Movement Adjustment" Component and set ONLY Z Movements to be Stopped.

  • This is because we don't want X Movement to stop but Z needs to so Omen doesn't move vertically.

  • Next we will be changing the Animation in "Update Animation" Component to "Omen_HurKick1_FB0".
     

  • This is where Omen supposed to go Helicopter Mode and loop on the Attack but we will not do it yet! We will return to this eventually.
     

  • Keep in mind that both Attempts to Hit is at "Sprite Run 0 and 2" so keep these values in mind!

  • Now let's add an Addon Entry Gate and follow it up by a "Play Sound - CD" Addon.
     

  • Our Condition to trigger will be "Animation Element = 0 OR = 2" as these are the Frame Runs that the attempt to hit exist which are mentioıned above.
     

  • Our Sound will be "Omen_Wiff0", a simple whiff sound.

  • Important part is we will have a "Restart Delay" value of 4. Which means that after this State Addon triggers AND 4 frames passes, it will restart itself and check for Conditions again so that Whiff sound can continuously trigger in those Animation Element values.

  • Moving on, we add a State Change Addon with "Animation Over" Condition once again. Let's have a State ID value of "1810" this time, which will be our next State.
     

  • We won't be adding an Attack Definition yet.
     

  • Let us move on with the "Falling Down State" now!

 5- Falling State Definition

  • We are done with Main State for now so let's go on with the Falling one!
     

  • Now let's copy the State Definition 1805 we just made previously and set all the State ID values to 1810, including the Custom Event.
     

  • Next we will be changing the Animation in "Update Animation" Component to "Omen_HurKick4_FB0".

  • Now let's add a State Component named "Set X Movement", set "Move Direction" to "Forward" and a "Timeline" too and rename it something we prefer!
     

  • After making a call for a Timeline Reference and link it to the input of the Addon, let's link "Update and Finished" inputs and outputs to each other.
     

  • Finally let's create a Float Track with two keys at Time 0 with value of 400 and Time 1 with value of 300 to mimic that Omen slows down a bit as he falls down. Finally link it to Movement Value of our Component.

  • We almost done with the Falling State, but we did not start to even fall yet!
     

  • We would like to immediately start falling so what we need is "State Component - Set Gravity".
     

  • It can be put in any place as long as it can trigger the moment this State Triggers. For now "Movement Started" Output in "Set X Movement" Addon is fine for it!

  • Finally we will need to define "What will happen after we land on Ground or a Stage Object?" so for that we will be using "Z Contact SM Trigger" Extension, which we used a lot before!
     

  • We will set State Module values to "Main State Module" and trigger the State ID 52, which is the regular "Jump Landing State" which is more than enough!

 6- Input State Definition

  • We have worked a lot for this move so let's give it a test! First, we shall copy Input State Definition of Standing Heavy Kick and convert it to a Hurricane Kick instead!
     

  • We are using value "12" for "Act System Bool List" and keep the Character Stance Condition same as we want to be on ground when trying to Hurricane Kick.
     

  • Let's delete the Input Combination too as we will make a brand new one.

  • After updating the Comment Title, lets change Target State Module to "MyOmen_SpecialAttacks_SM" and set State to Triggers Value to 1800, which is our Starter State Definition ID!

  • As all the Hurricane Kicks go, the input shall be "Down + Down/Backward + Backward + Light Kick".
     

  • For this we need an array of 3 "Movement Input - Single Choice" and 1 "Action Input - Single Tap".

  • As all the Hurricane Kicks go, the input shall be "Down + Down/Backward + Backward + Light Kick".
     

  • For this we need an array of 3 "Movement Input - Single Choice" and 1 "Action Input - Single Tap".

  • If you followed up everything correctly, Omen will be doing a Hurricane Kick after doing the planned inputs!

  • Now there is one thing to fix before move on. In Each State Definition there is a Boolean named "Face to Closest Enemy" and it is toggled on by Default.
     

  • Let's toggle them off for all States but not the first one so that Omen does not turn around when the Enemy jumps away or another Enemy gets closer.

  • Finally let's add an Attack Definition. We will just copy paste the one that the actual Omen has, the one that comes with UF2D itself.
     

  • Feel free to add your own or adjust to your liking!
     

  • PS: I am also not taking the nodes that give and take power. That's another topic we will discuss later.

 7- Post State Variable List

  • Now, we do have an Hurricane Kick move but Omen is not helicoptering around enough. We need to make Main State last longer possibly by making the animation loop for longer.
     

  • The "Wrong" way is making separate States with different animation loop values. It would still be acceptable but we do have a better system and it is called "Post State Var List"!

  • Basically, "Post State Variable Lists" are a way to communicate with a State Module before it triggers a State. You can send bunch of variable types and change the way a State works before it is fully triggered. This variable also exists for "Change State Addons" as well!

  • Before we continue, let's prepare an integer variable named "Move Type". What we aim is this:
     

  • Value 0: Loop = False / Loop Count = 0
    Value 1: Loop = True   / Loop Count = 3
    Value 2: Loop = True   / Loop Count = 5
     

  • So for each Value, we will have a different Loop and Count value. 0 is for Short Hurricane Kick, 1 is for Medium and 2 for Long one.

  • Let's test it out! When we change Move Type value to 2, Omen helicopters more. And when we bring the value back to 0, he no longer loops the animation!
     

  • Now let's edit Move Type via Post State Variable List!

  • Here is how we do it; Again in our State Module, drag "Post State Variable List" to the graph right after "State 1800" Custom Event.
     

  • This will allow us to set the value before anything code-worthy started to to happen.
     

  • Break the Struct and only get the Integer Array it provides and get the first value. Then connect it to the "Set Move Type" node.

  • It is time to set "Post State Variable List" value so we can set Move Type properly.
     

  • Let's go back to our MyOmen_Char and in "Input System" Graph, go to the Input Definition for "Light Hurricane Kick".
     

  • Drag out from "Post State Var List" input and select "make C_PostState_Var_list".
     

  • Next, only care about "Integer List" and drag out from it to select "Make Array". We need an Array of only one item and its first item needs its value as "0".

  • In case it was not clear enough, the value in the first image below provides the value on the second image. This is a good way to communicate with the State before triggering it completely, allowing you to make adjustments and setting variable values to use later on!

i1.PNG
i2.PNG
  • Finally it is time to make 2 more Hurricane Kick Input State Definitions for medium and long duration of Animations.
     

  • After copy pasting, we shall change the Comment Titles, Post Variable List value to 1 and 2 (to change Move Type integer value in our State Module) and let the Action Input to be "Medium Kick" and "Heavy Kick"!
     

  • Watch video for a better visualization!

  • If you followed up everything correctly, Omen will be doing a different Hurricane Kick for each separate Kick Input!

    This is all for a Hurricane Kick! Feel free to continue to next tutorial about Projectiles here. Thank you for your time!

bottom of page