"Struggle" Mechanics in Game maker 2, or Unity?

Aug 15, 2020
24
24
Hi there, I'm working on my own game (don't want to ramble too much until I can actually get 0.0.1 finished,) but I need help! I'm no programmer, and I was wondering if anyone has a suggestion on how to make it to when an enemy uses there "grab" the camera zooms, and it plays an animation loop and depending on the enemy, it does a specific little struggle mechanic (button mash being the standard for games like this, but I'd also like to do a press the matching button chain, where screwing up plays a little animation, and prevents you from retrying for a few seconds?) Any help, or tutorials are really helpful too!
 

Titilonic

Newbie
May 20, 2019
18
6
"suggestion on how to make it to when an enemy uses there "grab" the camera zooms, and it plays an animation loop and depending on the enemy, it does a specific little struggle mechanic (button mash being the standard for games like this, but I'd also like to do a press the matching button chain, where screwing up plays a little animation, and prevents you from retrying for a few seconds?) Any help, or tutorials are really helpful too!"

Hello, the behavior is independent of the engine. Here's an example:
To keep it simple, let's say that the Player is on the left and the Enemy on the right. Both have a health bar, a position (in the X axis) and strength value. So let's call their valuest PH, PP and PS as well as EH, EP and ES.
In this game, the player can either grab (PP+grab range - EP < 0) or gets grabbed if an enemy touches her (EP - PP < 0). This is a simple test, just check the distance and do the appropriate animation(s).
At that point the game enters a separate state and the struggle bar shows up, acting as you described. The bar goes to the right by ES, every second and, while that happens, a combination shows up and entering it pulls the bar to the left by PS. There's also a cool-down before the next combination shows up, it's just another timer that starts when the combination was entered.
While this happens both PH and EH decrease depending on the struggle bar's position, Once either runs out of health the struggle stops in either Game Over or the Enemy cumming then fainting.

Does that help?
 
Last edited: