Just wanting a sounding board for a way to go about this. I'm using QABS (Action Battle System) so everything I discuss would be in the context of on-map sprite combat (no turn-based combat or battle screen).
In essence, certain events will cause the player to enter a state of "grappling." Mashing keys (ex. the Z key) fast enough in a certain time frame will cause the player to escape the grapple and return to ABS combat. Not being fast enough with the mashing will cause the player to take damage and reset the grapple loop and timer (so if they're too slow at mashing, they'll stay in the grapple forever and just keep taking damage over and over).
My game will not be using an MP/mana bar. So here's what I'm thinking on how to accomplish this behind the scenes.
When the player enters the "grappling" state, movement is disabled and the player is equipped with an invisible piece of equipment that grants them the "escape" skill (bound to the Z key for example). While in this state, all other skills are disabled. The "escape" skill simply regenerates a portion of the mana/MP bar and has no cooldown. Meanwhile, a background skill is also in use during the grappling state which constantly drains your mana/MP bar. Therefore, you need to use the "escape" skill over and over quickly and repeatedly (i.e. mashing the Z button) in order to build up your mana faster than it drains. Then have a conditional trigger to escape the grapple state if the MP bar is filled to a certain amount.
Not sure if it's possible to make a skill that gradually drains mana over time...so maybe just have the background mana-draining skill used over and over again on a loop, costing 1 mana and just have it "drain over time" that way?
A wait timer could then be implemented so that if the player doesn't fill their MP bar to the threshold for escape within an allotted time, they take damage and the entire grappling event resets.
I'd obviously just call the MP bar an escape meter or something and set up some sort of HUD/gauge so that it displays on screen during the grappling state.
Is there a better way to go about this? I feel like nesting so many skill loops could cause performance issues depending on how far this system goes.
In essence, certain events will cause the player to enter a state of "grappling." Mashing keys (ex. the Z key) fast enough in a certain time frame will cause the player to escape the grapple and return to ABS combat. Not being fast enough with the mashing will cause the player to take damage and reset the grapple loop and timer (so if they're too slow at mashing, they'll stay in the grapple forever and just keep taking damage over and over).
My game will not be using an MP/mana bar. So here's what I'm thinking on how to accomplish this behind the scenes.
When the player enters the "grappling" state, movement is disabled and the player is equipped with an invisible piece of equipment that grants them the "escape" skill (bound to the Z key for example). While in this state, all other skills are disabled. The "escape" skill simply regenerates a portion of the mana/MP bar and has no cooldown. Meanwhile, a background skill is also in use during the grappling state which constantly drains your mana/MP bar. Therefore, you need to use the "escape" skill over and over quickly and repeatedly (i.e. mashing the Z button) in order to build up your mana faster than it drains. Then have a conditional trigger to escape the grapple state if the MP bar is filled to a certain amount.
Not sure if it's possible to make a skill that gradually drains mana over time...so maybe just have the background mana-draining skill used over and over again on a loop, costing 1 mana and just have it "drain over time" that way?
A wait timer could then be implemented so that if the player doesn't fill their MP bar to the threshold for escape within an allotted time, they take damage and the entire grappling event resets.
I'd obviously just call the MP bar an escape meter or something and set up some sort of HUD/gauge so that it displays on screen during the grappling state.
Is there a better way to go about this? I feel like nesting so many skill loops could cause performance issues depending on how far this system goes.