As I make the attack animations for my teamwork-based 2D playformer, I realize that I never tried to creating a separation between hitboxes and hurtboxes in Construct 3.
What I’m trying to create is, for example, if you were playing Smash Bros. and it was Link vs Ryu or smth. They’re both on the ground and try to lunge out to hit the other, Ryu with his leg and Link with his sword. Ryu’s leg and Link’s sword collide. Ryu takes damage because his leg was hit by the sword, but Link takes no damage because even though Ryu’s leg hit his sword, the sword is not a part of Link’s body. In other words, because Link has a sword, his hitboxes extend further than his hurtbox does; his hitboxes are disjointed. Since Ryu does a lot of fighting with his fists and legs, his hitboxes don’t really extend past his hurtboxes as much.
My player-controlled characters use weapons that extend past their body as Link’s sword would. My first idea was to create two separate collision polygons on the player character’s animations, but unless I’ve missed something I don’t believe there’s a way to assign two totally separate collision polygons to one animation frame. My second idea was to make the player characters into two separate entities, much like the Kiwi player character and its “base” and “mask” in the Kiwi Story sample game. The problem with this is, the way I see it, I would need to give every instance of a recurring enemy character with disjointed hitboxes so that I would have to say “thisenemy1’s base is attached to thisenemy1’s mask... thisenemy2’s base is attached to thisenemy2’s mask...” even though both “thisenemy”-s would be visually and functionally identical.
If my second idea was indeed the best way to create hitboxes vs hurtboxes and there actually is a way to give recurring enemies disjoints without making a brand new entity every time, please tell me how I can do that. However, if there is a better/more intuitive way to create this hitbox-hurtbox separation, I would greatly appreciate if someone could tell me how or direct me to a video that explains it. Thank you in advance for your help!