r/howdidtheycodeit • u/_Allusions • Jun 28 '22
Question Ability Combat System Like RuneScape (3)-- Channeled Abilities
I've been working on attempting to recreate the functionality (damage application, hit timing, etc. not so much models and animations) of the RuneScape combat system in Unreal Engine as a learning exercise in UI and combat mechanics.
However, there are certain elements that I will refer to as quirks that I can't figure out. I suspect these are due to the way the abilities are called to start/stop channeling and its interaction with the game loop tick that would also need to be replicated, such as this example:
Global cooldown (time between when abilities can be fired): 1.8 seconds (constant)
Assault (channeled ability): Channel while hitting up to 4 times, once every 1.2 seconds. However, if a new ability input is made after 4.2 seconds, Assault will still hit for its full 4 hits while simultaneously hitting with the newly input ability at the same time as its last hit and effectively “canceling” or “avoiding” some of its channel time.
This process of “canceling” channels as early as possible while still getting off all the relevant hits and squeezing in an additional ability hit is a key part of mastering the current game’s combat system, though I have no idea how to recreate this bundle of spaghetti.



