Rhythm-Based Combat Help

Hi! I have an idea for a game that uses rhythm-based combat in a JRPG style (similar to Mother 3’s battle system.) I’m currently learning how to do systems like exp, money, leveling, health, etc. through various Youtube videos and forums on this site, however I don’t see anything on how to create a rhythm-styled combat system or game in Unreal. The main idea I have is that you must press the attack button to the beat of a song playing during battles, and you can perform combos if you continue to tap the attack button to the beat of the song. Again, very much akin to the way you fight in Mother 3.

So the question is this: how do I set it to where during certain points of a BGM, if you tap the designated attack button, you can string together a combo for doing damage during fights. Any help would be appreciated!


bumping this post again

So, having never implemented anything like this myself lol, I would point you in the direction of timers which I personally have found to be very useful. There are lots of good tutorials and documentation on them out there that you can check out. In your case you might want to try something like having the beginning of the song starting the timer and then checking the players input against the timer to see if it was correct.

Hope this was helpful.

Aah, that’s a good idea! I could try doing that. The only problem I could see with that though is if the game lags? Would that separate the timing from the event ticks and the song’s audio track?

Maybe this video will help you achieve what you would like or, at least, give you leads. Sync Even

That’s exactly what I was looking for omg!!! Thank you guys so much!!! I’ll mess around with these ideas once I get the chance but thank you for your help!

Thanks for this, I didnt know about the feature!

I doubt this is the best solution for OPs rhythm game, since he would need to set up hundreds of keyframes, that would all become obsolete if he changed the song to something different.

I have a small rhtyhm minigame, for which I am using timers. Timers are set up to trigger at the same tempo as the music flows (tempo of the song is stored inside a variable at the beginning of the level) so I can use any song dynamically without it breaking my game. Anyway, lets say the BPM of the song is 120, which means I would set the timer to launch an event every 0.5 seconds (=60/bpm). The event then pops up a random note, which is visible on the screen for 1 second, and player must press a button corresponding to the note popped up during the last 0,0-0.25 seconds of that time to get score. If you hit at the right time, the “combo counter” variable goes up by 1 every time, and resets to 0 when missing.