Melee Combat System V 1.0
- Includes a semi-intelligent Melee Combat System
- Allows infinite number of key-presses
- 100% Blueprint Based [No C++ Code]
- Rather smoothe and has only one issue (which honestly is not even an issue, persay)…[read below]
Known Bugs
- The Melee system and animation blueprint interaction are not TRULY ‘key-press’ specific… What I mean by that, is the animation blueprint basically just checks to see if the Melee Timer has reached 0. If it has not, it moves onto the next animation, whereas if it were TRULY key-specific, it would read the melee chain, and play animations the moment a key is pressed (assuming the melee timer is not 0 )…
My theory to resolve this, allowing for a more realistic melee system, is by adding key-press conditions to the animblueprint’s event-graph. I’m sure it’s possible, but, I have not even looked into that at all. I’m trying to focus more on the stability of the ‘timer’ functionality.
Semi-Tutorial
Melee Branch
*
Character Event Graph
-
Event Tick
-
Sequence-Node
[list] -
Melee Invoke (Custom Function… Read Below)
-
Cast To your animation blueprint. In this project, “Cast to MondoAnimBP”-Node
-
Set two Attacking variables, and connect as demonstrated in the project. (It seems arbitrary, but, if not included for some reason, the melee system just DOES NOT WORK AS INTENDED)… I cannot figure this out, but, I do think it has something to do with the AnimBP not truly relying on the key-press. "Can anyone look into this and confirm? I’m almost certain it is… But again, that’s for way later. This suffices for the time being. Alternatively, a delay works, but, the problem is it seems to have error if the game gets laggy. And you never know what HW is running the software.
-
Set “IsInMelee?” basedon chain count >= 2
-
Delay
-
Set “Attacking” to false
-
Set “IsInMelee” to false
-
(completely useless for now, but, it’s what will be used to incorporate the sequence features. Read below…) Clear keypress to Array of string.
-
Reset the “MeleeEndTimer” to “MeleeBaseTime”, which is our ‘count-down’ variable.
-
Set “MeleeChainCount” += 1
-
Melee Invoke: Includes actual timer functionality such as counting down, resetting variables once timer is 0, etc. The “Core”.
[/list]
*
With this simple controller, you can see how EASY melee-combat is with Blueprint.
What’s Next?
- Sequence based melee-chain. In essence, specific key-presses in “specific” or “range” time-frames. More details later…
Download V 1.0 – Includes character controller, and entity from “Bless”, the game. Please keep in mind that this project is solely based on educational intentions. Use the content to build your own Melee-Combat driven game, please.
Also, check out Zombie-Camp, which very soon, will implement this system, alongside MeleeKombat 1.1 in the next Zombie-Camp release.(which is currently being rebuilt from scratch to minimize project size)
IMPORTANT! -PROJECT INSTALL
- Create new Third person Blueprint project
- Delete ALL files in Content folder, and replace with the downloaded ones.
- Create a new level
- Ready to go ! Please report any issues you might stumble upon!
Thx.
Feedback greatly appreciated!