Umbrella Project
Summary
I enjoy hack and slash games and wanted to try making a combo mechanic. It's not my first time doing hack and slash, but it's a lot better than my previous attempt at it. I also attempted a quick time event system with (I think) a pretty good result.
Video
Breakdown
HackNSlash-
For the combo this is a system that I've been developing in my head for like a year now. Basically each attack is imported separately and put together in UE4. Each attack has time notifies that turns a boolean called "canCombo" on and off. When "canCombo" is on, if the player presses either the normal attack or heavy attack button, the game will continue the combo by jumping to the next appropriate animation.
The player input also has a buffer that can hold a command briefly so that the game feels more responsive.
Below is the switch for heavy attacks
For the combo this is a system that I've been developing in my head for like a year now. Basically each attack is imported separately and put together in UE4. Each attack has time notifies that turns a boolean called "canCombo" on and off. When "canCombo" is on, if the player presses either the normal attack or heavy attack button, the game will continue the combo by jumping to the next appropriate animation.
The player input also has a buffer that can hold a command briefly so that the game feels more responsive.
Below is the switch for heavy attacks
Quick Time Event-
The quick time event was a tough problem and I'm not sure if the way I did it is optimal, but it is pretty simple to work with at least.
The basic concept goes like this:
1. the player hits the enemy.
2. the enemy checks if it can trigger a QTE. If so, then it triggers a QTE sequence for itself and the player.
3. during each QTE section, the enemy script can ask the player for a certain command in a window. Since this is a branching QTE sequence, then each section has to have a name associated with it so the enemy can tell the player what the appropriate input is to continue the sequence.
4. if the player does not issue the right input, then the fail sequence set to be next. Otherwise, the pass sequence is played next. I set the pass/fail sequences to be played after the current section so that the animations would be seamless since they're animated from the same frame.
5. once the QTE sequence is finished, play resumes as normal.
I made the QTE scripts in the enemies so that way the player script doesn't get overcluttered and each QTE script can be unique to each enemy more easily. The enemy handles all the branches and the player just has a script that asks for an input from time to time.
The quick time event was a tough problem and I'm not sure if the way I did it is optimal, but it is pretty simple to work with at least.
The basic concept goes like this:
1. the player hits the enemy.
2. the enemy checks if it can trigger a QTE. If so, then it triggers a QTE sequence for itself and the player.
3. during each QTE section, the enemy script can ask the player for a certain command in a window. Since this is a branching QTE sequence, then each section has to have a name associated with it so the enemy can tell the player what the appropriate input is to continue the sequence.
4. if the player does not issue the right input, then the fail sequence set to be next. Otherwise, the pass sequence is played next. I set the pass/fail sequences to be played after the current section so that the animations would be seamless since they're animated from the same frame.
5. once the QTE sequence is finished, play resumes as normal.
I made the QTE scripts in the enemies so that way the player script doesn't get overcluttered and each QTE script can be unique to each enemy more easily. The enemy handles all the branches and the player just has a script that asks for an input from time to time.