How to Implement a "Parry" mechanic to a 2D game?

Hello mates!
My name is Eden and I am a student for Game Design and Development.
In the latest project of my semester I am making a 2D game and I want to implement a Parry mechanic.
I was wondering if anyone could help me with that type of code? It would mean the world to me if you help me out, or even give general advice on your thought process for this mechanic.

The idea I have for the meantime is:
create an animation event method that instantiates a new game object with a collider (let’s say, “enemy parry collider”). create the same one for the player. only if the two new objects collide, get the parry to work.
am I doing this right? How can I control the time? Can I also implement a time slow?

Thank you very much in advance,
Eden.

can also reach me on my email: edenalon73@gmail.com

Hi Eden,

Welcome to our community! :slight_smile:

Slowing down the game speed with Time.timeScale and calling methods via animation events is covered in Glitch Garden in our Unity 2D course. In the method, you could instantiate a prefab.

Please feel free to ask our helpful community of students for further advice over on our Discord chat server.


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms