1 decade ago by fuelless
Hello everyone!
I'm new around these parts (bought the licence last Friday) but I am already enjoying the engine very much.
I'm planning on doing a top-down rpg much like secret of mana and was wondering how are you guys solving the melee attacks in your projects.
I understand, and have done ranged attacks in the tutorials, but I was wondering which would be the best way to solve melee ones. The idea is that there will be different kinds of weapons available to the characters.
The solutions that occurred to me are:
>checking for the distance between the enemies and the player-character and the orientation. Maybe even considering the angles between them as well. The wepons would be a separate entity with animations just like the character.
>using the bounding boxes impact already has implemented, having the weapon as a different entity (only one frame) and rotating accordingly to the attack. This is the more realistic one but I'm not so sure about how to do it.
Thanks in advance!
I'm new around these parts (bought the licence last Friday) but I am already enjoying the engine very much.
I'm planning on doing a top-down rpg much like secret of mana and was wondering how are you guys solving the melee attacks in your projects.
I understand, and have done ranged attacks in the tutorials, but I was wondering which would be the best way to solve melee ones. The idea is that there will be different kinds of weapons available to the characters.
The solutions that occurred to me are:
>checking for the distance between the enemies and the player-character and the orientation. Maybe even considering the angles between them as well. The wepons would be a separate entity with animations just like the character.
>using the bounding boxes impact already has implemented, having the weapon as a different entity (only one frame) and rotating accordingly to the attack. This is the more realistic one but I'm not so sure about how to do it.
Thanks in advance!