Easiest way (and what I'd do for melee combat) is to use less hitboxes. A single large hitbox, or two/three non-overlapping hitboxes per attack animation should work fine. I feel like putting enemy hurtboxes on a cooldown or using more complicated processes to enable/disable collisions dynamically would get very annoying to handle very fast (and could generate situations where you expect enemies to take damage, but they don't!).
The easy way would be a bool, obviously you have a node that does apply damage. On attack make bool true, after apply damage do bool false. Before either the trace or before damage branch true.
See I tried this but the attack damage code is in the Anim State so even if you put a bool there it will still do damage every time the Sphere Trace collides with the enemy
@MMPK yes just watched the video. On the node on the ai, I'm guessing on any damage, in there you can setup the do once, then apply the damage, add a small delay (you could pull the delay based of the anim sequence playing (time remaining or simular)) Then reset the do once.
@@MMPK would you want to collab? Maybe like a 2weeks you 2 weeks me or every other week no communication build. Iv not got a big channel so can't help much with getting views but could be fun.
Haha that's actually what I did in the full video. It's the easy solution but definitely not the right one as it leads to very inconsistent damage on the enemy depending on how many times your weapon collides with the enemy during the attack.
the answer is I frames (immunity frames where you can only deal damage once every 0.2 etc seconds
You could try a simply if statement just saying if damage is > 0, wait time then damage = 0
Hmm interesting idea. Ive heard of I-frames in fighting games etc. but don't know how you would implement them. I'll look into this, thanks!
Easiest way (and what I'd do for melee combat) is to use less hitboxes. A single large hitbox, or two/three non-overlapping hitboxes per attack animation should work fine.
I feel like putting enemy hurtboxes on a cooldown or using more complicated processes to enable/disable collisions dynamically would get very annoying to handle very fast (and could generate situations where you expect enemies to take damage, but they don't!).
The easy way would be a bool, obviously you have a node that does apply damage. On attack make bool true, after apply damage do bool false. Before either the trace or before damage branch true.
See I tried this but the attack damage code is in the Anim State so even if you put a bool there it will still do damage every time the Sphere Trace collides with the enemy
@MMPK yes just watched the video. On the node on the ai, I'm guessing on any damage, in there you can setup the do once, then apply the damage, add a small delay (you could pull the delay based of the anim sequence playing (time remaining or simular))
Then reset the do once.
@@VirusUk That's actually a great idea, not sure why i didn't think of using a delay node. Thanks! Will give this a try!
@@MMPK would you want to collab? Maybe like a 2weeks you 2 weeks me or every other week no communication build. Iv not got a big channel so can't help much with getting views but could be fun.
Lower damage or higher it´s hp. Seems simple.
Haha that's actually what I did in the full video. It's the easy solution but definitely not the right one as it leads to very inconsistent damage on the enemy depending on how many times your weapon collides with the enemy during the attack.
😮