Hittables Documentation

Introduction

  • This tool is for making any actor react to hit with a states based system and without writing any blueprint script.

  • I’ve tried to put tooltips everywhere so make sure you check out each property’s tooltip first!

  • Multi-Threaded

  • User friendly/Memory friendly (You should choose one when creating actors)

  • Supports both UE4 and UE5

Showcase

Demonstration Video

Quick Setup Tutorial

Setup

After you purchased the plugin make sure you enable it in your project and then do the following steps to get the plugin working.

“Show Engine Content” should also be enabled. Now you have access to the plugin content folder.

Feel free to explore the different directories, read the C++ source code if you
're interested (not necessarily) it is filled up with comments.

Step 1

Click on Add where you want to place your hittable actor then select Blueprint Class

Step 2

Search "Hittable" word and select the desired class.

Hittable_Static classes root components are static mesh component and Hittable_Skeletal classes root components are skeletal mesh components.

On the other hand we have Optimal and Simple, Simple is more user friendly but takes more space in the memory.

Step 3

And that's how you can create hittable actors.

Make sure your weapon calls one of the ApplyDamage functions on hit otherwise you have to call "TakeDamage" function of your hittable actor manually.

Which Class I Should Select?

Static: The root component is a static mesh component.

Skeletal: The root component is a skeletal mesh component.

Simple: User friendly UI, if you want to build up something fast and you don’t really care about the memory usage this is the right class for you.

Optimal: Memory Friendly, these class types have the optimal memory usage but their UI might be a bit complicated. You must use these types for the mobile development. (Recommended)

Simple Static Hittables

First thing you should do is to set your actor's base mesh inside the blueprint.

Then you should select "Class Defaults" and start setting your actor's behavior.

As you can see at the top right corner you can add states, effects and etc. We will go through each property one by one now.

Settings

Apply Remaining Damage to Next State: If you enable this, then the remaining damage will be transferred to the next state. Let me explain it with an example, assume that your actor has 2 states, each state has its own health. The state one's health is 20 and the second state's health is 10. Now if you apply 50 units damage, 20 units of this damage will trigger state 1 but there is still 30 units left, so it will apply the remaining damage to the next state as well and state 2 will get triggered too. we still have 20 more units left but there is no other states left therefore those 20 units will burn.
Now if "Apply Remaining Damage to Next State" was disabled then the applying damage process would when the state 1 got triggered and the actor would wait for another damage to trigger the second state.

States: You can define your states with this variable, there is no limit in terms of states counts so feel free to add as many as you desire.

Let's break down each state now.


Health: The amount of damage the state requires to get triggered.

Loop: When the state gets triggered the health will reset to its default value and the state will repeat forever.

Lifespan: This variable has 2 functionalities.

  1. Belongs to the Last State: It will self destruct the actor.

  2. Doesn't Belong to the Last State: It will trigger the next state automatically when the lifespan exceeds. It's often useful when your actor is explodable.

React to Damage Class IDs: If you want this actor to only react to certain damage types you can enter the class IDs.

- Separate IDs with comma (,)
- Enter "All" if you want it to react to any type of damage
- Your Custom Damage Class IDs are also supported!

Engine Default Class IDs
Base Damage Class ID ---- 0
Point Damage Class ID ---- 1
Radial Damage Class ID -- 2

Example: 1,2,4

Effects: The effects that will show up when this state gets triggered. (Ordered by Alphabet Ascending)

This is the main part of the plugin.

You can add handful of effects fast and easy but there is only one rule that you have to consider!

Order of your effects matter!
If you have Material, Decal and Mesh effects then you have to be careful with the order of these.

Mesh must be at the bottom, decal and material must be on top of the mesh. Keep in mind that you can easily drag the elements up and down.

Overview
- Other Effects/Nothing
- Meshes
- Other Effects/Nothing
- Materials, Decals & Physics
- Other Effects/Nothing

Effects Order Auto Debugging

You can validate your effects by simply selecting your hittable actor and hit the "Validate Effects Order" button. The plugin will tell you whether the orders are wrong or not.

What Will Each Effect Do?

NOTE: Those effects with RANDOMIZABLE label can be randomized, which means if you add multiple effects of same type one of them will be selected randomly when the state gets triggered.

Camera Shake: Plays a camera shake.

Noise: Emits noise for AI agents.

Material: Changes the root component's material.

Index: Which material slot should it be replaced with?

RANDOMIZABLE

Mesh: Replaces the root component's mesh.

Replacement Delay: You can add a delay for replacing mesh.

RANDOMIZABLE

Decal: Spawns a decal at hit location.

Randomize Rotation: Yaw rotation will be randomized if you enable this.

RANDOMIZABLE

Radial Damage: Applies radial damage to proximity actors.

Physics: Manipulates physics settings. Adds linear impulse or angular impulse.

If you don't want to add any impulse simply set the impulse strength to 0.

Sound: Plays a sound effect (2D or 3D).

Particle System: Spawns a particle system at the desired location.

Relative Transform: These variables can be used in order to manipulate the spawned system location, rotation and scale and as you know they are relative.

Niagara System: Spawns a niagara system at the desired location.

Relative Transform: These variables can be used in order to manipulate the spawned system location, rotation and scale and as you know they are relative.

Spawn Actor: spawns an actor at the desired location, if you want to spawn the actor at a specific location it's best to spawn it at (0,0,0) then make the actor find its location itself and set the location.

RANDOMIZABLE

Custom Effect 1-10: If there was a functionality you required but it wasn't listed in the effects list then you can add your custom effect easily.


HOW TO USE
It's simple, just open up your hittable actor's blueprint, go to the Event Graph and Search for "Custom Effect" then override your custom functionality and done.

Then you can use this custom effect in any of your states.

All of the effects above work for both static and skeletal hittables the same.
The only difference is that skeletal hittables have bone name in some of the effects that static ones don't.

Optimal Static Hittables

They work pretty much the same with a tiny little different.
In optimal classes states and effects are separated and should be added individually.

As you can see we the properties are almost the same, in states we can no longer see the Effects variable, instead of that we have variable right under the States variable that we can add the effects we like.

The benefit of this system is that it will take WAY less memory space but the down side to it is that you have to assign each effect to a state manually by its index.

Check out the image below you'll see.

Now you have "Owner State" in every effect element.

For this example this material belongs to the state 0, which means it will take effect whenever the actor enters the state 0.

And that's it for the optimal classes.

Check out more examples at the "Plugins/Hittables Content/Hittables/Examples" there are both simple and optimal version for all of the actors in order to make everything more clear.

Convert Simple to Optimal

You can simply copy states and effects from Simple to Optimal class and vice versa.

Simple Skeletal Hittables

These work exactly the same as static hittables. They just have a few extra effects that we will demonstrate here.

As you can see it is pretty much the same, the root component is changed and the effects list has some extra stuff too.

Skeletal Hittable Exculsive Effects

You pretty much know most of these effects so we're gonna skip those and start explaining the ones you don't know which are coupled with the skeletal mesh component.

Again this list's sorted by alphabet (asc) so you can quickly find what you need.

Animation: Plays an animation asset.

Animation Blueprint: Sets the animation blueprint of the root component.

Animation Montage: Plays an animation montage.

There are 3 different "StartModes" that you use based on your requirements.

Constraint Profile: Sets the constraint profile for the root component.

Profile Target: You can apply the profile to All Bones, Hit Bone Only or a Custom Bone.

Manipulate Bone: It will hide, terminate or show a bone.

Optimal Skeletal Hittables

The system works exactly the same as the optimal static hittables with skeletal hittables effects. If you haven't read the Optimal Static Hittables section make sure you comeback and read it carefully.

Blueprint Exposable Functions

Check out "BP_Hittable_Demonstration" blueprint located at "Plugins/Hittables Content/Hittables/Blueprints" to see all of the blueprint exposed functions and events.

Congratulations! You've mastered the plugin.

Please rate the product, it won’t take more than 1 minute, but it means a lot for me. Just click the rate button:

Thank you for purchasing the plugin, I hope you enjoy it

Hints

  • Whenever a feature didn’t work, check out the output log first. You’ll probably find something useful there.

  • All of the screenshots used in this document are from the example project of the plugin which you can download from the store page.

  • I tried to set a tooltip for every variable and function in the plugin, so always check the tooltips first.

  • If you had any question after reading this documentation, feel free to send me an email. thekooroshtorabi@gmail.com I will try to answer ASAP

Updates Log

1.0.3

  • Major bug fixes and Improvments