Download

Melee fighting moveset - what kind of objects would you use to define attacks / specials etc?

Sorry if the topic is unclear. I’m currently using structs to store all the logic involved in launching an attack. The set of variables looks something like this:

Anim montage: anim montage (with all notifies inside)
Damage: int
Stun on block: int
Stun on hit: int
(+ a lot more…)

So I’ve built a logic that given specific input fires a corresponding struct taking all the variables into account. Works fine

The thing is - what if in the future I wanted an attack to have some additional special mechanic that could influence the world for example? I can’t really add that into my struct can I?
Especially that I’d like to have the ability to customise player’s moveset.

How would you tackle that? What kind of objects are different attacks in games usually?

Thanks for your time, any help really appreciated

Typically you can add whatever into a struct and the logic running a struct is fine. You can even shuffle items around in the struct. But don’t go removing items or you’ll have to go into each blueprint incorporating the struct and re-wire what was removed.