top of page

- Projectile Creation -

    Welcome! In this Tutorial we will be making a Projectile for our Fighter "My_Omen" which will be just a small cute Hadouken.
    
    Before we start, I assume that you checked all other Fighter Tutorials and Documentation!

i1_edited.jpg

 1- Using the Template

  • Firstly, let's create a new Folder that will contain our Projectile. Then go to the Template folder and find the Blueprint named "Projectile_Temp" and copy it into our folder.
     

  • Let's not forget to name it "MyOmen_Proj0" too. 0 is there for it is our first Projectile as we will do many more examples later on!

  • We will not be changing the Projectile's animations but feel free to do so if you want! Difference between Fighter's FAnim i is that Projectiles don't have such a Component. The animations reside inside the Projectile Blueprint itself!
     

  • One thing to note is that this Projectile's Flipbook has Empty Sprites slots to mimic the old days look. In order for Flipbook to not have collision issues, we use "First Frame Collision" for Collision Source option.

  • We did not touch neither the Material nor the World Collision sizes and such as we don't need to. But feel free to do it yourself!
     

  • We will have many other Projectiles in various sizes in other upcoming Tutorials but let's keep it very simple for now!

 2 - Creating a Projectile State Module

  • Once again we can use the Templates provided! First let's move "Projectile Folder" to "Gameplay" and create a new folder in it named "Proj_SMs".
     

  • Then in Templates folder go to "State Module" one and copy "Proj_Temp_SM". Feel free to rename it as well!
     

  • Since this will be our first Projectile State Module, let's delete everything so we can start from scratch!

  • Procedures we will follow be exactly same as Fighters. Let's create a Custom Event and name it "State 100".
     

  • 100 is just a random number I picked and you can put any number as long as it's not between 5000-6000 as the are used for main states that all Projectiles have.
     

  • Of course we need a State Definition too!

  • Now let's use a "Component - Update Animation" with an "Extension" that lets us the the "Basic" Animation that we define in Projectile BP.
     

  • Also what we need is a "Component - Removal Adjustments". Default values for X (Width Limit), -Z and +Z (Height Lowbound and Highbound) are fine. However we want our Projectile to not have a time limit so we change the "Remove Time in Frames" to "-1".

  • In this Component, limits are decided by the Camera. If Projectiles middle point passes a certain point away from Camera's visual limits, it will be destroyed. Values defined here adds extra tolerance to these directions, hence the + sign in them so that you can have a Projectile gets into "Destroyed" State farther away from camera view.

  • Next Component we need is "Component - Collision Responses". It's default values are enough for this basic Projectile so let's see what they are about.
     

  • "Character" Section holds the parameters are related to Projectiles response to the situation if it gets in contact with a Character. For example "Pause Time" is about how long the Projectile pauses itself.

  • As mentioned above, Pause Time defines how long the Projectile will be paused in place and freeze its functionality. Same as when a Fighter attacks and pauses itself after the attack lands.
     

  • Health Reduction is about how much Health the Projectile itself will lose after an attack of it lands on a Character.

  • "Stage Object" Section defines whether the Projectile interacts with Ground, Wall and Objects or not. Projectiles have basic States that trigger that you check in the "Main State Module" variable in our Projectile BP. 
     

  • Feel free to check it out. But for now we shall just return to our casual Projectile!

  • Last important Component will allow us to move the Projectile! For that we need "Component - Set X Movement". Let's go over it slowly!
     

  • First of all, easy stuff. We want "Move Direction" to be "Forward" of the Projectile itself. Projectile's rotation (whether looking at left or right) is defined by its Spawner's rotation. So if a Fighter is looking to the right, so will the Projectile when it is spawned.

  • We can also leave "State Module Parameters" as default or empty as this Projectile won't be doing anything with Stage Objects or Walls.

  • In UF2D, movements are dictated by Timelines for extreme freedom on the values we want to have.
     

  • First let's add a Timeline by [RMB] click on an empty space and select "Add Timeline...". However in order to trigger this Timeline, the Component node demands a reference to the TL we just created too. So let's link the Timeline fully!

  • Now we can Double [LMB] click edit this Timeline and give it "Length" value of 1000" and "Float Track" into it and have only one value of 600 in it.
     

  • This means this Timeline will run for 1000 seconds and the Projectile will move 10 pixels per frame tick (600 x 0.016667 = 100). Don't forget to link the Float Values of both TL and Component to each other!

  • Finally we are done with Components. Only thing left is adding an Addon Entry Gate so we can finally start adding an Attack Definition to our Projectile so we can hit other Fighters!

  • This will be a long video about the Attack Definition itself. We are not going through this again because this Attack Definition is almost exactly the same Fighters one.
     

  • One extra thing different about Projectile Attack Definitions is that, there is an extra variable named "Frame Focus".
     

  • Remember in Projectile's Flipbook we selected "First Frame Collision" for "Collision Source"? It is basically same when "Frame Focus" is 0!
     

  • As a side note, we have Trigger Condition ticked so that this Definition will trigger every frame.

Capture.PNG

    That's it for the Projectile. We will be using this one for Omen's Projectile spawning State Module here. Thanks for your time!

bottom of page